decord/source/utils/native/StringUtils.tsx

50 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 9498
// Function ID: 9499
2026-07-20 16:05:17 +00:00
// Name: splitGraphemes
2026-08-24 06:08:38 +00:00
// Dependencies: [9497, 2]
2026-07-20 16:05:17 +00:00
// Exports: splitGraphemes
2026-08-24 06:08:38 +00:00
// Module 9498 (splitGraphemes)
import set from "set" /* 2 */;
import rawDefault from "raw" /* 9497 */;
const result = set.fileFinishedImporting("utils/native/StringUtils.tsx");
2026-07-20 16:05:17 +00:00
export const splitGraphemes = function splitGraphemes(closure_0) {
2026-08-24 06:08:38 +00:00
const obj = rawDefault();
2026-07-20 16:05:17 +00:00
const items = [];
let match = obj.exec(closure_0);
let num = 0;
let num2 = 0;
if (null !== match) {
do {
2026-07-29 08:29:29 +00:00
let tmp2 = num;
let tmp3 = match;
2026-07-20 16:05:17 +00:00
if (match.index > num) {
let push = items.push;
let _Array = Array;
let items1 = [];
2026-07-29 08:29:29 +00:00
let tmp4 = items1;
2026-07-20 16:05:17 +00:00
let num3 = 0;
let arraySpreadResult = HermesBuiltin.arraySpread(Array.from(closure_0.slice(num, match.index)), 0);
2026-07-29 08:29:29 +00:00
let tmp6 = push;
let tmp7 = items1;
let tmp8 = items;
2026-07-20 16:05:17 +00:00
let applyResult = HermesBuiltin.apply(items1, items);
}
let arr = items.push(match[0]);
num = obj.lastIndex;
match = obj.exec(closure_0);
num2 = num;
} while (null !== match);
}
if (num2 < closure_0.length) {
const push2 = items.push;
const _Array2 = Array;
const items2 = [];
HermesBuiltin.arraySpread(Array.from(closure_0.slice(num2)), 0);
HermesBuiltin.apply(items2, items);
}
return items;
};