pub fn call_string_method(
s: &str,
method: &str,
args: &[Value],
) -> GentResult<Value>Expand description
Call a method on a string value
§Arguments
s- The string to call the method onmethod- The method nameargs- Arguments to the method
§Supported Methods
length()- Returns the character counttrim()- Removes leading/trailing whitespacetoLowerCase()- Converts to lowercasetoUpperCase()- Converts to uppercasecontains(substr)- Checks if substring existsstartsWith(prefix)- Checks if string starts with prefixendsWith(suffix)- Checks if string ends with suffixsplit(separator)- Splits string by separatorreplace(old, new)- Replaces first occurrence