RosettaCodeData/Task/String-length/Forth/string-length-3.fth

10 lines
112 B
Forth

2 base !
: utf8+ ( str -- str )
begin
char+
dup c@
11000000 and
10000000 <>
until ;
decimal