Post Reply 
How do you delete characters in a string?
11-01-2017, 04:11 AM (This post was last modified: 11-01-2017 04:11 AM by webmasterpdx.)
Post: #14
RE: How do you delete characters in a string?
So, this is seems to be the most optimized version for now.

Code:

// Drop chars from string.
// S   String.
// L   Pos of leftmost char before deletion.
// R   Pos of first char on right after deletion.
EXPORT STRDEL(S,L,R)
BEGIN
LOCAL N:=DIM(S);
RETURN IFTE(L<1,"",S(1,L))+IFTE(R>N,"",S(R,N)); // N just has to go past end of string
END; // BEGIN...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How do you delete characters in a string? - webmasterpdx - 11-01-2017 04:11 AM



User(s) browsing this thread: 1 Guest(s)