[Pharo-project] Substrings for strings?
I can't find any method that allows me to take a substring out of a string my location and length. Anyone know?
2010/2/19 Nathan Tuttle <nathan.tuttle@gmail.com>
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.
Anyone know?
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
location := 5. length := 3. result := 'Foo Bar Baz' copyFrom: location to: position + length - 1 2010/2/20 Nathan Tuttle <nathan.tuttle@gmail.com>
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Cheers, Peter
Thank you very much! 2010/2/19 Peter Hugosson-Miller <oldmanlink@gmail.com>
location := 5. length := 3. result := 'Foo Bar Baz' copyFrom: location to: position + length - 1
2010/2/20 Nathan Tuttle <nathan.tuttle@gmail.com>
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Cheers, Peter
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 20 feb 2010, at 02.44, Nathan Tuttle <nathan.tuttle@gmail.com> wrote:
Thank you very much!
...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
2010/2/19 Peter Hugosson-Miller <oldmanlink@gmail.com> location := 5. length := 3. result := 'Foo Bar Baz' copyFrom: location to: position + length - 1
2010/2/20 Nathan Tuttle <nathan.tuttle@gmail.com> 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Cheers, Peter
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr 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 <oldmanlink@gmail.com>
On 20 feb 2010, at 02.44, Nathan Tuttle <nathan.tuttle@gmail.com> wrote:
Thank you very much!
...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
2010/2/19 Peter Hugosson-Miller < <oldmanlink@gmail.com> oldmanlink@gmail.com>
location := 5. length := 3. result := 'Foo Bar Baz' copyFrom: location to: position + length - 1
2010/2/20 Nathan Tuttle < <nathan.tuttle@gmail.com> nathan.tuttle@gmail.com>
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 <Pharo-project@lists.gforge.inria.fr> Pharo-project@lists.gforge.inria.fr <http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Cheers, Peter
_______________________________________________ Pharo-project mailing list <Pharo-project@lists.gforge.inria.fr>Pharo-project@lists.gforge.inria.fr <http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
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 Pharo-project@lists.gforge.inria.fr 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 <stephane.ducasse@inria.fr
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr 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 <stephane.ducasse@inria.fr> 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
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 <stephane.ducasse@inria.fr> 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr 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 Pharo-project@lists.gforge.inria.fr 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 < stephane.ducasse@inria.fr > 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (6)
-
csrabak@bol.com.br -
Eliot Miranda -
Marcus Denker -
Nathan Tuttle -
Peter Hugosson-Miller -
Stéphane Ducasse