Skip to content

Extra function suggestions.Β #110

@Designer023

Description

@Designer023

Hey πŸ‘‹

I would like to suggest some functions to add to the GROQ queries if possible. I would love to add them myself, but not sure how or where to start. I have managed to create one by chaining the existing functions, but for the others I require functions that don't exists.

My suggestions are:

// truncate a string to N chars
string::truncate(string, number)
// Extra rounding functions
math::floor(number)
math::ceil(number)
// Convert/coherse string into a number - Not sure how to implement to float or int (Maybe a flag)
number(string)
// or:
number::int(string)
number::float(string)

Currently I am truncating a string with array::join(string::split((pt::text(body)), "")[0..255], "") which is not ideal 😬

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions