diff --git a/README.md b/README.md index b7047980..0b9b7bf3 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ The namespace exposes the following string manipulation functions: - [`repeat( str, n )`][@stdlib/string/repeat]: repeat a string a specified number of times and return the concatenated result. - [`replaceBefore( str, search, replacement )`][@stdlib/string/replace-before]: replace the substring before the first occurrence of a specified search string. - [`replace( str, search, newval )`][@stdlib/string/replace]: replace search occurrences with a replacement string. -- [`reverseString( str )`][@stdlib/string/reverse]: reverse a string. +- [`reverseString( str[, options] )`][@stdlib/string/reverse]: reverse a string. - [`rpad( str, len[, pad] )`][@stdlib/string/right-pad]: right pad a string. - [`rtrimN( str, n[, chars] )`][@stdlib/string/right-trim-n]: trim `n` characters from the end of a string. - [`rtrim( str )`][@stdlib/string/right-trim]: trim whitespace characters from the end of a string. diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index ac89651e..647daaed 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -855,23 +855,20 @@ interface Namespace { * Reverses a string. * * @param str - input string + * @param options - options * @returns reversed string * * @example - * var out = ns.reverseString( 'last man standing' ); + * var out = ns.reverseString( 'last man standing', { + * 'mode': 'code_unit' + * }); * // returns 'gnidnats nam tsal' * * @example - * var out = ns.reverseString( 'presidential election' ); - * // returns 'noitcele laitnediserp' - * - * @example - * var out = ns.reverseString( 'javaScript' ); - * // returns 'tpircSavaj' - * - * @example - * var out = ns.reverseString( 'Hidden Treasures' ); - * // returns 'serusaerT neddiH' + * var out = ns.reverseString( '🐶🐮🐷🐰🐸', { + * 'mode': 'grapheme' + * }); + * // returns '🐸🐰🐷🐮🐶' */ reverseString: typeof reverseString;