Add cleanDiacritics method

This commit is contained in:
Sander Pick
2017-11-05 09:41:50 -08:00
committed by GitHub
parent 718ba93da6
commit 49764af960
+7
View File
@@ -91,6 +91,13 @@ declare module 'underscore' {
*/
clean(str: string): string;
/**
* Replace diacritic characters with closest ASCII equivalents.
* cleanDiacritics('ääkkönen') => 'aakkonen'
* @param str
*/
cleanDiacritics(str: string): string;
/**
* Count occurences of a sub string.
* ('Hello world', 'l') => 3