develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35609 - branches/strings/pseudocode

From:
simon
Date:
January 15, 2009 16:18
Subject:
[svn:parrot] r35609 - branches/strings/pseudocode
Message ID:
20090116001803.88725CB9AE@x12.develooper.com
Author: simon
Date: Thu Jan 15 16:18:02 2009
New Revision: 35609

Modified:
   branches/strings/pseudocode/ParrotString.pm

Log:
Ironically, I need to get the length of a string.


Modified: branches/strings/pseudocode/ParrotString.pm
==============================================================================
--- branches/strings/pseudocode/ParrotString.pm	(original)
+++ branches/strings/pseudocode/ParrotString.pm	Thu Jan 15 16:18:02 2009
@@ -43,7 +43,7 @@
     $news.charset  = $charset;
     $news.encoding = $encoding;
     $news.buffer   = map { ord $_ }, split("", $s);
-    $news.bufused = $news.strlen = $len || length($s);
+    $news.bufused = $news.strlen = $len || $s.chars;
     return $news;
 }
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About