export const AppStringHelper = { remove00: (text: string) => { if (!text) { return text; } // return text.replace(/\x00/g, ""); return text.replaceAll("\x00", ""); }, extractFloat: (text: string, def: number = 0) => { const group = /(\d+)/.exec(text); if (group?.length) { return parseFloat( group[0]); } return def; }, last: (text: string, max = 4) => { if (text && text.length > max) { return text.substring(text.length - max); } return text; }, left(text: string, max) { if (text && text.length > max) { return text.substring(0, max); } return text; } };