codegen, bindings: implement str-length and indicate lengths