@abaplint/runtime 2.1.75 → 2.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.count_any_of = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
function count_any_of(input) {
|
|
6
|
+
let found = 0;
|
|
7
|
+
const val = input.val.get();
|
|
8
|
+
const sub = input.sub.get();
|
|
9
|
+
if (sub !== "") {
|
|
10
|
+
for (const char of sub.split("")) {
|
|
11
|
+
const match = val.match(new RegExp(char, "g"));
|
|
12
|
+
found += (match === null || match === void 0 ? void 0 : match.length) || 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return new types_1.Integer().set(found);
|
|
16
|
+
}
|
|
17
|
+
exports.count_any_of = count_any_of;
|
|
18
|
+
//# sourceMappingURL=count_any_of.js.map
|
|
@@ -32,6 +32,7 @@ __exportStar(require("./lines"), exports);
|
|
|
32
32
|
__exportStar(require("./match"), exports);
|
|
33
33
|
__exportStar(require("./matches"), exports);
|
|
34
34
|
__exportStar(require("./nmax"), exports);
|
|
35
|
+
__exportStar(require("./count_any_of"), exports);
|
|
35
36
|
__exportStar(require("./nmin"), exports);
|
|
36
37
|
__exportStar(require("./repeat"), exports);
|
|
37
38
|
__exportStar(require("./replace"), exports);
|