@abaplint/runtime 1.8.35 → 1.8.38
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.
|
@@ -34,7 +34,12 @@ function replace(input) {
|
|
|
34
34
|
else if (input.regex) {
|
|
35
35
|
sub = input.regex.get();
|
|
36
36
|
}
|
|
37
|
-
if (input.
|
|
37
|
+
if (input.off && input.len) {
|
|
38
|
+
const offset = input.off.get();
|
|
39
|
+
const length = input.len.get();
|
|
40
|
+
val = val.substring(0, offset) + wi + val.substring(offset + length);
|
|
41
|
+
}
|
|
42
|
+
else if (input.occ === undefined && sub && wi) {
|
|
38
43
|
val = val.replace(sub, wi);
|
|
39
44
|
}
|
|
40
45
|
else if (input.occ && input.occ.get() === 0 && sub && wi !== undefined) {
|
package/build/src/builtin/sy.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.sy = new types_1.Structure({
|
|
|
6
6
|
abcde: new types_1.Character({ length: 26 }).set("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),
|
|
7
7
|
datlo: new types_1.Date(),
|
|
8
8
|
datum: new types_1.Date(),
|
|
9
|
+
fdpos: new types_1.Integer(),
|
|
9
10
|
index: new types_1.Integer(),
|
|
10
11
|
langu: new types_1.Character({ length: 1 }).set("E"),
|
|
11
12
|
mandt: new types_1.Character({ length: 3 }).set("123"),
|
package/build/src/compare/cs.js
CHANGED
|
@@ -16,7 +16,17 @@ function cs(left, right) {
|
|
|
16
16
|
else {
|
|
17
17
|
r = right.get().toString();
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
const index = r.indexOf(l);
|
|
20
|
+
if (index < 0) {
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
abap.builtin.sy.get().fdpos.set(l.length);
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
abap.builtin.sy.get().fdpos.set(index);
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
20
30
|
}
|
|
21
31
|
exports.cs = cs;
|
|
22
32
|
//# sourceMappingURL=cs.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { Table } from "../types";
|
|
1
2
|
import { ICharacter } from "../types/_character";
|
|
2
3
|
import { INumeric } from "../types/_numeric";
|
|
3
4
|
export interface IDescribeOptions {
|
|
4
5
|
field: any;
|
|
5
6
|
type?: ICharacter;
|
|
6
7
|
length?: INumeric;
|
|
8
|
+
lines?: INumeric;
|
|
9
|
+
table?: Table;
|
|
7
10
|
mode?: "BYTE" | "CHARACTER";
|
|
8
11
|
}
|
|
9
12
|
export declare function describe(input: IDescribeOptions): void;
|