Checks if the given string contains whitespace.
(x: string) => booleancontainsWhitespace("test string");
// ⇒ truecontainsWhitespace("test");
// ⇒ false- How to check if a string contains whitespace?
Empty string.
""empty();
// ⇒ ""- How to get an empty string?
Transforms the first character to lowercase.
(text: string) => stringfirstToLower("TeSt");
// ⇒ "teSt"- How to make the first letter of a string lowercase?
Transforms the first character to uppercase.
(text: string) => stringfirstToUpper("teSt");
// ⇒ "TeSt"- How to make the first letter of a string uppercase?
Checks if the given substring is present in the source string.
(search: string) => (text: string) => booleanincludes("brown fox")("The quick brown fox jumps over the lazy dog");
// ⇒ trueincludes("brown dog")("The quick brown fox jumps over the lazy dog");
// ⇒ false- How to check if a string contains a given substring?
Non-breaking space.
" "nbsp;
// ⇒ " "- How to get a non-breaking space?
Checks if the given string is present and is not empty or all whitespace.
(x?: string) => booleannonEmpty("test with spaces");
// ⇒ truenonEmpty(" ");
// ⇒ falsenonEmpty(null);
// ⇒ false- How to check if a string is non-empty?
- How to check if a string is not all whitespace?
- How to check if a string is not null or undefined?
Checks if the given string starts with the given substring.
(prefix: string) => (xs: string) => booleanstartsWith("The")("The quick brown fox jumps over the lazy dog");
// ⇒ truestartsWith("Quick")("The quick brown fox jumps over the lazy dog");
// ⇒ false- How to check if a string starts with a given substring?