substringBefore
Returns the substring before the first occurrence of the character sequence chars in str.
substringBefore
Returns the substring before the first occurrence of the character sequence chars in str.
Type: transform
Parameters
- input (unknown): The input string.
- chars (unknown): The character sequence to search for.
Returns
Type: string
The substring before the first occurrence of the character sequence chars in str.
Examples
substringBefore("hello world", " ") // "hello"