diff options
Diffstat (limited to 'src/lib/_str.rs')
| -rw-r--r-- | src/lib/_str.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/_str.rs b/src/lib/_str.rs new file mode 100644 index 00000000..ac27f294 --- /dev/null +++ b/src/lib/_str.rs @@ -0,0 +1,23 @@ +import rustrt.sbuf; + +native "rust" mod rustrt { + type sbuf; + fn str_buf(str s) -> sbuf; + fn str_len(str s) -> uint; + fn str_alloc(int n_bytes) -> str; +} + +fn is_utf8(vec[u8] v) -> bool { +} + +fn alloc(int n_bytes) -> str { + ret rustrt.str_alloc(n_bytes); +} + +fn len(str s) -> uint { + ret rustrt.str_len(s); +} + +fn buf(str s) -> sbuf { + ret rustrt.str_buf(s); +} |