StringField to support string delimeter
StringField to support string delimeter
Currently StringField only splits based on the first character of the delimiter. It would be even more useful if it would split based on whole strings.
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: StringField to support string delimeter
+1
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: StringField to support string delimeter
+1 for me also ... but ... there is an easy workaround.
Suppose you wanted the string delimiter to be the three characters " - ", then code like this will do the trick:
Suppose you wanted the string delimiter to be the three characters " - ", then code like this will do the trick:
Code: Select all
Define string$ = "Cat - sat - on - mat"
Define temp$, i
temp$ = ReplaceString(string$, " - ", Chr(1), 1)
For i = 1 To CountString(temp$, Chr(1))+1
Debug StringField(temp$, i, Chr(1))
Next i
End
Anthony Jordan
Re: StringField to support string delimeter
+1...
But with the advent of regular expressions built into PB, it kinda becomes a moot point... though of course it would be a heck of a lot faster than regex look behinds and look aheads.
But with the advent of regular expressions built into PB, it kinda becomes a moot point... though of course it would be a heck of a lot faster than regex look behinds and look aheads.