The group of style related methods allows you to 'style' a string and test the style of a string.
static bool isLowerCase(String? string)
The 'isLowerCase' method returns true if the 'string' contains no upper case characters. All other characters, digits etc are allowed.
Strings.isLowerCase('abc 1234');
-> true
Strings.isLowerCase('abC 1234');
-> false
If null is passed the 'string' is treated as an empty string and 'true' is returned.
The 'isLowerCase' method is available as an extension to the String class
'ABCD'.isLowerCase();
-> false
static bool isPrintable(int? character)
The isPrintable method returns true of 'character' is a printable character.
Whitespace characters are considered as non-printable.
The 'isUpperCase' method returns true if the 'string' contains no lower case characters. All other characters, digits etc are allowed.
If null is passed the 'string' is treated as an empty string and 'true' is returned.
The 'isUpperCase' method is available as an extension on the String class.
startsWithLowerCase
The 'startsWithLowerCase' method returns true if the 'string' starts with an lower case character.
If null is passed the 'string' is treated as an empty string and 'false' is returned.
The method 'startsWithLowerCase' is available as an extension on the String class.
startsWithUpperCase
The 'startsWithUpperCase' method returns true if the 'string' starts with a lower case character.
If null is passed the 'string' is treated as an empty string and 'false' is returned.
The method 'startsWithUpperCase' is available as an extension method on the String class.
The 'toCamelCase' method converts the string to camel case.
If 'lower' is set to true then the first chacter of the resulting string is lowercase.
If null is passed the 'string' is treated as an empty string and an empty string is returned.
The 'toCamelCase' method is available as an extension on the String class.
The 'toCapitalised' capitalises the first character of the 'string'.
If null is passed the 'string' is treated as an empty string and an empty string is returned.
The 'toCapitialised' method is available as an extension on the String class.
The 'toLowerCase' method converts the string all lower case.
If null is passed the 'string' is treated as an empty string and an empty string is returned.
The 'toProperCase' method converts the string to proper case where in the first letter of each word is capitalised.
If null is passed the 'string' is treated as an empty string and an empty string is returned.
The 'toSnakeCase' method converts the string to snake case where each word is separated by an underscore and all characters are lower case.
If null is passed the 'string' is treated as an empty string and an empty string is returned.
The 'toSnakeCase' method is available as an extension method on the String class.