snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
20
react/features/base/util/strings.web.ts
Normal file
20
react/features/base/util/strings.web.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Applies NFKC normalization to the given text.
|
||||
*
|
||||
* @param {string} text - The text that needs to be normalized.
|
||||
* @returns {string} - The normalized text.
|
||||
*/
|
||||
export function normalizeNFKC(text: string) {
|
||||
return text.normalize('NFKC');
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces accent characters with english alphabet characters.
|
||||
* NOTE: Here we use the unorm package because the JSC version in React Native for Android crashes.
|
||||
*
|
||||
* @param {string} text - The text that needs to be normalized.
|
||||
* @returns {string} - The normalized text.
|
||||
*/
|
||||
export function normalizeAccents(text: string) {
|
||||
return text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
||||
}
|
||||
Reference in New Issue
Block a user