all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
15
Task/String-length/Retro/string-length-2.retro
Normal file
15
Task/String-length/Retro/string-length-2.retro
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
chain: UTF8'
|
||||
{{
|
||||
: utf+ ( $-$ )
|
||||
[ 1+ dup @ %11000000 and %10000000 = ] while ;
|
||||
|
||||
: count ( $-$ )
|
||||
0 !here
|
||||
repeat dup @ 0; drop utf+ here ++ again ;
|
||||
---reveal---
|
||||
: getLength ( $-n )
|
||||
count drop @here ;
|
||||
}}
|
||||
;chain
|
||||
|
||||
"møøse" ^UTF8'getLength putn
|
||||
Loading…
Add table
Add a link
Reference in a new issue