Good afternoon, i want to trim the middle spaces of a text data type. How can i do that? The Trim function only works with the start or the end of that text...Can i use the substring function to check each position of the text until i found the empty space???
There is a basic function that can remove all spaces.
Try it with search=" " replace=""
Hi João,
I don't know if this is the case, but you can use this: https://www.outsystems.com/forge/component-overview/4945/just-letters
If you want to maintain the other characters that aren't letters you just need to tweak the C# code of the extension.
Hope this can help.
Best regards,
Ricardo
Ricardo Pereira wrote:
It's suppose to be a URL, so i need to maintain the other characters that are no letters. But thanks, i will try it.
João Lopes wrote:
Ok. You just need to open the C# code and edit the method. With that I think that you will be just fine.
I made an upload right now with a new version of JustLetters that already have a method to remove white spaces.
Regards,
Hello João Lopes,If I understand what you want to do, you can use the Replace Function.Example:Function ReplaceSyntaxEditor Code SnippetReplace("https://sdfs df s sdf sfd sdf sf . sdfs df sdf "," ","")Result: https://sdfsdfssdfsfdsdfsf.sdfsdfsdfHope this can help.Best Regards,Bruno Domingues
Bruno Domingues wrote:
Like this right, just need to compare both strings now. But thanks for the Help.
Compare? If your goal is to know if the text has a space, the best way is Index. If it returns -1 there are no spaces.
Just like this Index(String," ")