General area when it fits no where else

Moderator: Mmiscool

User avatar
By Electroguard
#58266 I need to trim an unwanted space character from the end of a payload string (and have a similar need to trim the front).

I've got something bloaty that works:
Code: Select allif asc(right(payload,1)) < 33 then payload = left(payload,len(payload) - 1) 'trim space or control character from right end
...but it weighs a ton and takes an age, so can someone suggest anything better please?
User avatar
By Mmiscool
#58274 I am uploading a new build now that includes a trim function.

Code: Select allbla = "   hello world    "
print trim(bla)

User avatar
By Electroguard
#58277 Umm, while that TRIM is still fresh in mind, what's the chances of a similar SNIP clone which snips off a specified number of characters from the head or tail of the specified variable, eg: SNIP(payload,num) where pos and neg numbers snipped from different ends?
I'll understand you swearing at me under your breath, but you'd probably swear a lot more if I waited till your mind was elsewhere before suggesting it as a feature request!