help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Best way to find if a string begins with a particul


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Best way to find if a string begins with a particular string..
Date: Wed, 17 Oct 2012 09:53:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0

Il 16/10/2012 23:18, Holger Hans Peter Freyther ha scritto:
>> > 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..
> might still be funny looping but you could be using PetitParser (i
> have a version of it on gitorious).

That's slightly heavy artillery. :)

Gwen has just beaten me to the answer, the method you want is #startsWith:.

Remember to look for methods in CharacterArray, not just String.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]