Kodall
Packages

Package: string

String handling APIs.

String handling APIs.

Methods

coalesce

ONE Workflow
function coalesce(value1 as string, value2 as string) as string

Returns the first non-null value. value2 cannot be null.

Since 1.5.1

contains

ONE Workflow
function contains(target as string, search as string) as bool

Returns true if the target string contains the specified search string.

endsWith

ONE Workflow
function endsWith(target as string, search as string) as bool

Returns true if the target string ends with the specified search string.

fromDateTime

ONE Workflow
function fromDateTime(value as datetime) as string

Converts a datetime value to a string.

fromDecimal

ONE Workflow
function fromDecimal(value as decimal) as string

Converts a decimal value to a string.

indexOf

ONE Workflow
function indexOf(target as string, search as string) as int

Returns the index of the first occurrence of the search string in the target string. If not found, returns -1.

isBlank

ONE Workflow
function isBlank(value as string) as bool

Returns true if the value is null or contains only whitespaces.

Since 1.7.0

isDateTime

ONE Workflow
function isDateTime(value as string) as bool

Returns true if the given string is a valid datetime representation.

isDecimal

ONE Workflow
function isDecimal(value as string) as bool

Returns true if the given string is a valid decimal representation.

isInt

ONE Workflow
function isInt(value as string) as bool

Returns true if the given string is a valid integer representation.

length

ONE Workflow
function length(target as string) as int

Returns the length of the string.

replace

ONE Workflow
function replace(target as string, from as string, to as string) as string

Replaces all occurrences of from with to in the target string.

split

ONE Workflow
function split(target as string, splitter as string) as list of string

Splits the target string into a list of substrings using the specified splitter string.

startsWith

ONE Workflow
function startsWith(target as string, search as string) as bool

Returns true if the target string starts with the specified search string.

substring

ONE Workflow
function substring(target as string, start as int, end as int) as string

Returns the substring of the target string from the specified start index to end-1.

toLower

ONE Workflow
function toLower(target as string) as string

Converts the target string to lowercase.

toSentenceCase

ONE Workflow
function toSentenceCase(target as string) as string

Converts the first character of the target string to uppercase and the rest to lowercase.

toTitleCase

ONE Workflow
function toTitleCase(target as string) as string

Converts the first character of each word in the target string to uppercase.

toUpper

ONE Workflow
function toUpper(target as string) as string

Converts the target string to uppercase.

trim

ONE Workflow
function trim(target as string) as string

The trim method removes whitespace from both ends of a the target.