String manipulation/cleanup

Multimedia Builder

String manipulation/cleanup

Postby Nigg » Thu Dec 05, 2019 12:14 pm

Hey guys,

a long time since the last post here. I interrupt the pause!

Does anyone know a simple, efficient way to "clean up" a text string, like removing white-spaces or special characters, for example?
Nigg
 
Posts: 56
Joined: Thu Apr 14, 2011 2:10 pm

Re: String manipulation/cleanup

Postby dgilmour » Thu Dec 05, 2019 4:09 pm

StrChange can do the job:
Code: Select all
t$ = 'Lorem ipsum dolor sit amet'
f$ = ' '
r$ = ''
t$ = StrChange(t$, f$, r$)
dgilmour
 
Posts: 536
Joined: Fri Oct 22, 2010 11:29 am
Location: Moskva, Rusko

Re: String manipulation/cleanup

Postby Nigg » Thu Dec 05, 2019 5:08 pm

Thanks, but that only works for one character, not for line breaks or more characters or a combination of that

// Edit: I was stupid, I now simply use multiple runs, works, thank you
Nigg
 
Posts: 56
Joined: Thu Apr 14, 2011 2:10 pm

Re: String manipulation/cleanup

Postby dgilmour » Thu Dec 05, 2019 6:14 pm

Nigg wrote:Thanks, but that only works for one character, not for line breaks or more characters or a combination of that

I almost believed you that it does work this way.
dgilmour
 
Posts: 536
Joined: Fri Oct 22, 2010 11:29 am
Location: Moskva, Rusko


Return to MMB

Who is online

Users browsing this forum: No registered users and 1 guest