Menu

#782 Allow 2 parameters with changestr

None
unread
nobody
CHANGESTR (1)
none
1
2021-02-02
2020-08-10
No

The function changestr(...) allow the user to remove needle (not only character-by-character as with translate) from haystack if the last parameter is set to '' (empty string). It's basically the only function that can be used to replace a text that way. It would be convenient if the function changestr would allow only two parameters and that mean that whatever needle is provided will remove it. The string class would have to be updated as well to also allow one parameter (needle) instead of two (needle + newneedle).

result = changestr( needle, haystack [, newneedle] )
Usage:
result = changestr( D2C(13)||D2C(10)||'
', haystack )

Discussion

  • Erich

    Erich - 2021-02-02
    • Milestone: 5.0.0 --> AIX
     
  • Erich

    Erich - 2021-02-02
    • Milestone: AIX --> None
     

Anonymous
Anonymous

Add attachments
Cancel