UNPKG

@stdlib/string

Version:

String manipulation functions.

39 lines (28 loc) 765 B
{{alias}}( str, clbk[, thisArg] ) Invokes a function for each Unicode code point in a string, iterating from right to left. When invoked, the provided function is provided three arguments: - value: code point. - index: starting code point index. - str: input string. Parameters ---------- str: string Input string over which to iterate. clbk: Function The function to invoke for each Unicode code point in the input string. thisArg: any (optional) Execution context. Returns ------- out: string Input string. Examples -------- > var n = 0; > function fcn() { n += 1; }; > {{alias}}( 'hello world!', fcn ); > n 12 See Also --------