Determine the length of a NUL-terminated character string in Forth
Download (right click, save as, rename as appropriate)
1 2 3 4 5
: strlen ( addr -- n ) dup 1 chars - begin char+ dup c@ 0= until swap - ;