@stdlib/string
Version:
String manipulation functions.
29 lines (22 loc) • 482 B
Plain Text
{{alias}}( str, search )
Returns the part of a string before the last occurrence of a specified
substring.
Parameters
----------
str: string
Input string.
search: string
Search value.
Returns
-------
out: string
Substring.
Examples
--------
> var str = 'Beep Boop Beep';
> var out = {{alias}}( str, 'Beep' )
'Beep Boop '
> out = {{alias}}( str, 'Boop' )
'Beep '
See Also
--------