ElliotHC Active Member Licensed User Jan 2, 2019 #1 I have searched everywhere on here and can't seem to find how to get the left side part of a string. I have "ABCDEFGHIJK" I need "ABC" I am using B4X: Log(MyString.Substring(3)) But I get "IJK", it's working left to right and I need right to left.[/code]
I have searched everywhere on here and can't seem to find how to get the left side part of a string. I have "ABCDEFGHIJK" I need "ABC" I am using B4X: Log(MyString.Substring(3)) But I get "IJK", it's working left to right and I need right to left.[/code]
mc73 Well-Known Member Licensed User Longtime User Jan 2, 2019 #2 B4X: myString.substring2(0,3) Upvote 0
DonManfred Expert Licensed User Longtime User Jan 2, 2019 #3 ElliotHC said: But I get "IJK" Click to expand... Never! B4X: Dim str As String = "ABCDEFGHIJK" Log(str.SubString(3)) DEFGHIJK Click to expand... Upvote 0
ElliotHC said: But I get "IJK" Click to expand... Never! B4X: Dim str As String = "ABCDEFGHIJK" Log(str.SubString(3)) DEFGHIJK Click to expand...
ElliotHC Active Member Licensed User Jan 2, 2019 #4 Sorry, yes that is correct Don. I was missing the 2 after substring (substring2(x,x)) I couldn't get it to work. Upvote 0
Sorry, yes that is correct Don. I was missing the 2 after substring (substring2(x,x)) I couldn't get it to work.
mangojack Expert Licensed User Longtime User Jan 2, 2019 #5 Im Confused ... Sorry @DonManfred ... I'd go with @mc73 ... Or are we still a bit shell shocked from New Years Celebrations ? Edit ... @DonManfred ... Apology .. I reread / get your post now . Upvote 0
Im Confused ... Sorry @DonManfred ... I'd go with @mc73 ... Or are we still a bit shell shocked from New Years Celebrations ? Edit ... @DonManfred ... Apology .. I reread / get your post now .
DonManfred Expert Licensed User Longtime User Jan 2, 2019 #6 mangojack said: Sorry @DonManfred ... I'd go with @mc73 Click to expand... his answer is something other than mine. I just stated that B4X: str.SubString(3) NEVER returns IJK when the str is "ABCDEFGHIJK" ElliotHC said: But I get "IJK" Click to expand... away from that the TO is giving unclear questions. ElliotHC said: I have "ABCDEFGHIJK" I need "ABC" Click to expand... and later he wrote (same post) ElliotHC said: But I get "IJK", it's working left to right and I need right to left. Click to expand... So i was only concentrating on the wrong result from Substring(3) Upvote 0
mangojack said: Sorry @DonManfred ... I'd go with @mc73 Click to expand... his answer is something other than mine. I just stated that B4X: str.SubString(3) NEVER returns IJK when the str is "ABCDEFGHIJK" ElliotHC said: But I get "IJK" Click to expand... away from that the TO is giving unclear questions. ElliotHC said: I have "ABCDEFGHIJK" I need "ABC" Click to expand... and later he wrote (same post) ElliotHC said: But I get "IJK", it's working left to right and I need right to left. Click to expand... So i was only concentrating on the wrong result from Substring(3)
ElliotHC Active Member Licensed User Jan 2, 2019 #7 Thanks guys, I'm slowly working my way through all the commands Upvote 0