<div dir="ltr">Thanks...you're just all over the place today, aren't you?<div><br></div><div>Rob<br><br><div class="gmail_quote">On Sun, Sep 28, 2008 at 10:54 AM, Janko Mivšek <span dir="ltr"><<a href="mailto:janko.mivsek@eranova.si">janko.mivsek@eranova.si</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d"><br>
<br>
Rob Rothwell wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
While we are on the subject, is there an easy way to replace a substring with another one? I couldn't figure out any other way than to collect: the substrings and then put them back together...<br>
</blockquote>
<br>
<br></div>
aString copyReplaceAll: 'substring' with: 'another'<br>
<br>
<br>
Janko<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Rob<div class="Ih2E3d"><br>
<br>
On Sun, Sep 28, 2008 at 10:27 AM, Norbert Hartl <<a href="mailto:norbert@hartl.name" target="_blank">norbert@hartl.name</a> <mailto:<a href="mailto:norbert@hartl.name" target="_blank">norbert@hartl.name</a>>> wrote:<br>
<br>
On Sun, 2008-09-28 at 09:12 -0500, Mark Volkmann wrote:<br>
> What's the recommended way to determine if a String contains another<br>
> String?<br>
> I found one way.<br>
><br>
> '*substring*' matches: string<br>
><br>
> I'm sure I could use a regular expression, but that seems like<br>
overkill.<br>
> At first I thought I should use include: or contains: from<br>
Collection,<br>
> but apparently not.<br>
><br>
> ---<br>
string includesSubstring: 'substring'<br>
<br>
Norbert<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br></div>
<mailto:<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a>><div class="Ih2E3d"><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
<br>
<br>
<br></div>
------------------------------------------------------------------------<div class="Ih2E3d"><br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></blockquote><font color="#888888">
<br>
-- <br>
Janko Mivšek<br>
AIDA/Web<br>
Smalltalk Web Application Server<br>
<a href="http://www.aidaweb.si" target="_blank">http://www.aidaweb.si</a></font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div></div>