Jump to content
UBot Underground

How To Erase Trailing Space ?


Recommended Posts

 

try

ui text box("Enter Text",#Text)
set(#Text,$trim(#Text),"Global")

 

That is for erasing text before the user input. I said about erasing text after the user input (erase trailing white space characters).

Thanks for trying to help though. 

Edited by bangali_beta
Link to post
Share on other sites

That is for erasing text before the user input. I said about erasing text after the user input (erase trailing white space characters).

Thanks for trying to help though. 

 

That will remove leading and trailing spaces, meaning: before and after. The $trim function is the exact function you want to use in this situation.

 

Example:

set(#Text,"








         this is some text            





















            ","Global")
set(#Text,$trim(#Text),"Global")

  • Like 1
Link to post
Share on other sites

 

That will remove leading and trailing spaces, meaning: before and after. The $trim function is the exact function you want to use in this situation.

 

Example:

set(#Text,"








         this is some text            





















            ","Global")
set(#Text,$trim(#Text),"Global")

I didn't know it erases trailing white characters! Thanks for bringing it to my attention.

I have LIKED both your and PASH's posts.

Thank you both!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...