Marco Banchieri Member Apr 4, 2017 #1 Good morning. I come from Visual Basic and I need use some string commands (like right() Left()) and I try to use in B4A. I found something about the use of String Utils, but I dont found nothing to load into my project. Please can I have instructions about it ? Thank you.
Good morning. I come from Visual Basic and I need use some string commands (like right() Left()) and I try to use in B4A. I found something about the use of String Utils, but I dont found nothing to load into my project. Please can I have instructions about it ? Thank you.
Erel B4X founder Staff member Licensed User Longtime User Apr 4, 2017 #2 StringUtils is not related. There is a library named StringFunctions which wraps the built-in string methods and provides the VB style methods. I recommend you to learn to use the internal methods. They are very simple: https://www.b4x.com/android/help/core.html#string You need to use SubString and SubString2: Code: Dim s As String = "abcdef" Dim prefix As String = s.Substring2(0, 3) 'abc Dim suffix As String = s.Substring2(s.Length - 3, s.Length) 'def Upvote 0
StringUtils is not related. There is a library named StringFunctions which wraps the built-in string methods and provides the VB style methods. I recommend you to learn to use the internal methods. They are very simple: https://www.b4x.com/android/help/core.html#string You need to use SubString and SubString2: Code: Dim s As String = "abcdef" Dim prefix As String = s.Substring2(0, 3) 'abc Dim suffix As String = s.Substring2(s.Length - 3, s.Length) 'def