forked from s390guy/vm370
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSERT.HELPREXX
More file actions
20 lines (16 loc) · 968 Bytes
/
INSERT.HELPREXX
File metadata and controls
20 lines (16 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
INSERT function
+-----------------------------------------------------------------------------+
| INSERT(new, target, [pos], [length], [pad]) |
+-----------------------------------------------------------------------------+
Returns a copy of string target with string new inserted at position pos,
padded to length length with character pad. If pos is greater than the length
of target, target is extended to that position with pad characters. If pos
is not specified, it defaults to 0 (i.e., the start of the target string). If
length is not specified, it defaults to the length of the new string. If pad
is not specified, it defaults to blank.
Examples:
INSERT(' ', 'abcdef', 3) == 'abc def'
INSERT('123', 'abc' , 5,6) == 'abc 123 '
INSERT('123', 'abc' , 5,6, '+') == 'abc++123+++'
INSERT('l23', 'abc') == '123abc'
INSERT(' 123' , 'abc' , , 5, ' - ') == '123--abc'