I can't find any method that allows me to take a substring out of a string my location and length.
Anyone know? _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
2010/2/19 Nathan Tuttle <[hidden email]> I can't find any method that allows me to take a substring out of a string my location and length. Hint: look in SequenceableCollection.
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Nathan Tuttle
location := 5.
length := 3. result := 'Foo Bar Baz' copyFrom: location to: position + length - 1 2010/2/20 Nathan Tuttle <[hidden email]> I can't find any method that allows me to take a substring out of a string my location and length. -- Cheers, Peter _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Thank you very much!
2010/2/19 Peter Hugosson-Miller <[hidden email]> location := 5. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On 20 feb 2010, at 02.44, Nathan Tuttle <[hidden email]> wrote:
...says he, generously ignoring my copy/paste error. Seriously, when will I learn not to post untested code in an email, no matter how trivial it seems at the time? Still, at least I spelled the method name correctly :-p. -- Cheers, Peter
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
but it worked! and it helped me I didn't have to override strings!
2010/2/19 Peter Hugosson-Miller <[hidden email]>
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Nathan Tuttle
the meta approach
did you try the methodfinder? open method finder type 'Foo Bar Baz' . 5 . 3 -> no single function 'Foo Bar Baz' . $B . 'Bar' -> no single function I stopped but often I find what I want. On Feb 20, 2010, at 1:05 AM, Nathan Tuttle wrote: > I can't find any method that allows me to take a substring out of a string my location and length. > > Anyone know? > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Often; I don't. I will try it more now that I know there are people who have success.
On Sat, Feb 20, 2010 at 2:45 AM, Stéphane Ducasse <[hidden email]> wrote: the meta approach _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On Feb 20, 2010, at 2:39 PM, Nathan Tuttle wrote: > Often; I don't. I will try it more now that I know there are people who have success. > The MethodFinder works for those methods that are registered... it kind of has a black list of known bad methods and a white list of known good ones, so if you don't add new methods there it will not find it... (We retained the MethodFinder because we intend to actually make it better at some point.. the idea is cool.. worth to be generalized and to be taken to a new level) Marcus > On Sat, Feb 20, 2010 at 2:45 AM, Stéphane Ducasse <[hidden email]> wrote: > the meta approach > > did you try the methodfinder? > > open method finder > > type > > 'Foo Bar Baz' . 5 . 3 > > -> no single function > > 'Foo Bar Baz' . $B . 'Bar' > -> no single function > > I stopped but often I find what I want. > > > On Feb 20, 2010, at 1:05 AM, Nathan Tuttle wrote: > > > I can't find any method that allows me to take a substring out of a string my location and length. > > > > Anyone know? > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Ah yes we should really changes its logic
Stef On Feb 20, 2010, at 9:15 PM, Marcus Denker wrote: > > On Feb 20, 2010, at 2:39 PM, Nathan Tuttle wrote: > >> Often; I don't. I will try it more now that I know there are people who have success. >> > > > The MethodFinder works for those methods that are registered... it kind of has a black list of known bad methods > and a white list of known good ones, so if you don't add new methods there it will not find it... > > (We retained the MethodFinder because we intend to actually make it better at some point.. the idea is cool.. worth to be > generalized and to be taken to a new level) > > Marcus > >> On Sat, Feb 20, 2010 at 2:45 AM, Stéphane Ducasse <[hidden email]> wrote: >> the meta approach >> >> did you try the methodfinder? >> >> open method finder >> >> type >> >> 'Foo Bar Baz' . 5 . 3 >> >> -> no single function >> >> 'Foo Bar Baz' . $B . 'Bar' >> -> no single function >> >> I stopped but often I find what I want. >> >> >> On Feb 20, 2010, at 1:05 AM, Nathan Tuttle wrote: >> >>> I can't find any method that allows me to take a substring out of a string my location and length. >>> >>> Anyone know? >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > -- > Marcus Denker -- http://www.marcusdenker.de > INRIA Lille -- Nord Europe. Team RMoD. > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
I'm not sure if we want to change but rather I feel what we need is to augment it in order other queries can successfully return the method which would do what the person is looking for.
my 0.019999... -- Cesar Rabak Em 20/02/2010 20:43, Stéphane Ducasse < [hidden email] > escreveu: Ah yes we should really changes its logic Stef On Feb 20, 2010, at 9:15 PM, Marcus Denker wrote: > > On Feb 20, 2010, at 2:39 PM, Nathan Tuttle wrote: > >> Often; I don't. I will try it more now that I know there are people who have success. >> > > > The MethodFinder works for those methods that are registered... it kind of has a black list of known bad methods > and a white list of known good ones, so if you don't add new methods there it will not find it... > > (We retained the MethodFinder because we intend to actually make it better at some point.. the idea is cool.. worth to be > generalized and to be taken to a new level) > > Marcus > >> On Sat, Feb 20, 2010 at 2:45 AM, Stéphane Ducasse wrote: >> the meta approach >> >> did you try the methodfinder? >> >> open method finder >> >> type >> >> 'Foo Bar Baz' . 5 . 3 >> >> -> no single function >> >> 'Foo Bar Baz' . $B . 'Bar' >> -> no single function >> >> I stopped but often I find what I want. >> >> >> On Feb 20, 2010, at 1:05 AM, Nathan Tuttle wrote: >> >>> I can't find any method that allows me to take a substring out of a string my location and length. >>> >>> Anyone know? >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > -- > Marcus Denker -- http://www.marcusdenker.de > INRIA Lille -- Nord Europe. Team RMoD. > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |