Hi all..

So I've been writing code this morning to parse various things and I'm not
sure what the best way to do for this next piece I need..

I need to determine if a string (read in from a stream) has a specified
string prefix present or not and return a boolean..

So, below are some example strings and the respective results :

'FooBarBaz' isStringPrefixPresent: 'Foo' -->true

'FooBarBaz' isStringPrefixPresent: 'Bar' --> false

'./mycoolfilename' isStringPrefixPresent: './' --> true

Is there a good way to do this without funny looping character by
character? I'll probably do that initially but thought I'd ask from
you that probably know better than I do..

Thx!

--Rick

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to