The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
How do you delete characters in a string?
10-31-2017, 03:13 AM
Post: #1
How do you delete characters in a string?
I need to remove a few characters in a string. I've tried to do it one by one using S(3):=""; but it doesn't work. S(3):="g" does replace a character but not with the null string "". I've tried S(3,1):= but you can't assign a value to this. REPLACE will work but you need to know the string beforehand and it'll replace other occurances of this string.

The only way I can see is to take the string before and after the point I want to remove the chars, and create a new string by appending them. This seems like a lot of work for such a simple task. Anyone know how to just remove a few characters at a known point in a string?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
How do you delete characters in a string? - webmasterpdx - 10-31-2017 03:13 AM



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