Extract directly from the string instead of calling the len() builtin. This is both cleaner and avoids a zero-extension to an integer on AVR, which led to a LLVM verification error.