feel-scala icon indicating copy to clipboard operation
feel-scala copied to clipboard

Conversion function string -> boolean

Open jonathanlukas opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

When an API uses String representations of booleans "true" and "false", it would be nice to parse them to actual boolean values.

Describe the solution you'd like

A function like this:

boolean(from: string): boolean

It would return a boolean true or false on exact matching, otherwise null with a meaningful error message.

A possible extension could be:

boolean(from: string, defaultValue: boolean): boolean

that would never return null, but always the default value if there is no exact match.

Related issues

Slack thread: https://camunda.slack.com/archives/C01QYD808A3/p1728550831522619

jonathanlukas avatar Oct 10 '24 09:10 jonathanlukas