If you use Pharo, you can also do that
<<inline: Finder.png>>
Note that you have to change 'Selector' with 'Example', and then you can type a
list of arguments separated by a dot and the expected result.
(If you want some inner details, it will do something like methodFor:
{_WHAT_YOU_HAVE_ENTER_})
Have fun,
Ben
On Apr 28, 2012, at 4:00 PM, Ben Coman wrote:
> I just discovered this new "bit of magic" from the Newbies list. My first
> impression playing with it is that MethodFinder>>methodFor: should be somehow
> more prominent in Tools>Finder and also in PharoByExample book. Quite a
> unique feature and demonstration of Smalltalk power for newcomers.
>
> cheers -ben
>
> Am 2012-04-27 um 17:27 schrieb H. Hirzel:
>
>> Hello
>> I use Squeak 4.3, Update 11860.
>> I want to remove the trailing spaces and or tabs and LF of a String
>> something like
>> 'abc
>> '
>> should just be
>> 'abc'.
>> If I remember that there was a method in class String to something
>> like this. Is this correct?
>> Is there a package with additional String convenience methods?
>
> you probably want
>
> 'abc ' withoutTrailingBlanks
>
> You can find that method by evaluating or printing
>
> MethodFinder methodFor: { {'abc '} . 'abc' } (a list with arguments {'abc
> '} and an expected result ( 'abc' ))
>
> HTH
>
> Best
> -Tobias
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
>
