Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Substring/RPG/substring.rpg
Normal file
25
Task/Substring/RPG/substring.rpg
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
* 1...5....1....5....2....5..
|
||||
D myString S 30 inz('Liebe bewegt das Universum!')
|
||||
D output S 30 inz('')
|
||||
D n S 2 0 inz(1)
|
||||
D m S 2 0 inz(5)
|
||||
D length S 2 0 inz(0)
|
||||
D find S 2 0 inz(0)
|
||||
|
||||
/free
|
||||
*inlr = *on;
|
||||
dsply %subst(myString:n:m);
|
||||
dsply %subst(myString:7:20);
|
||||
|
||||
length = %len(%trim(myString));
|
||||
dsply %subst(myString:1:length-1);
|
||||
|
||||
find = %scan('U':myString);
|
||||
dsply %subst(myString:find:9);
|
||||
|
||||
find = %scan('bewegt':myString);
|
||||
dsply %subst(myString:find:%len('bewegt'));
|
||||
|
||||
output = ' *** end *** ';
|
||||
dsply ' ' ' ' output;
|
||||
/end-free
|
||||
Loading…
Add table
Add a link
Reference in a new issue