![]() |
replacetext() and striptext()
replacetext and striptext
PHP Code:
|
I've needed something like this many times, and I've built my own.
This will save me a lot of time, thanks so much! rep++ sometime within the next 24 hours, unless I've given too much rep to you. We shall see. |
You could also create a GuiMLTextCtrl, set the text variable to the string with the \n's then just pull out getlines() which will return the lines as an array.
Another option is to savestring() to a temp file, then loadlines(). Both of these are kind of unnecessary though but should be mentioned regardless. EDIT: I don't get why you didn't just do like: PHP Code:
|
Quote:
|
Recently needed replacetext again and didn't like what I had in here. So I updated my original post with a couple of changes. The function runs a little faster than the others on the code gallery at the moment too.
|
All times are GMT +2. The time now is 03:31 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.