This is an update to my last patch (which you may not see because I sent it from the wrong email address). Here are my updated notes:
This patch implements the .trim() method for strings. Problem: I don't like the magic number '32 not_whitespace = is_cclass 32, s, start But I couldn't figure this out: $I0 = is_cclass .CCLASS_WHITESPACE, target, pos I was getting an 'unknown parrot op' or something like that (too tired to recompile and find out the exact error message). I can't figure out how to get parrot to recognize that. Many thanks to moritz++ for handholding on IRC. Oh, there are no tests because I couldn't find any pugs tests for this :( What's the appropriate procedure for this? However, all tests pass and a small test program passed (including calling trim() as a function). Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
trim.patch
Description: Binary data