MCPcopy Create free account
hub / github.com/Snapchat/Valdi / formatForIOSLocalizableStrings

Function formatForIOSLocalizableStrings

compiler/companion/src/strings/utils.ts:72–75  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

70}
71
72export function formatForIOSLocalizableStrings(string: string) {
73 let result = string.replace(/"/g, '\\"').replace(/\\u0020/g, ' '); // Existing hack to allow spaces to be added at the beginning or end of the string
74 return result;
75}
76
77// HACK: some translate strings JSON files in private_profile include a limited set of XML
78// entities.

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected