lib: drop non-Hare extras (ascii.digitval, bytes.copy, fmt.errpos)
ascii.digitval/isidstart/isidpart are lexer-private, not Hare-stdlib. Moved into lib/ww/lex/lex.ww as fn (renamed digitval to hexval since its sole job is the \\xHH escape decoder). bytes.copy and fmt.errpos have no Hare counterpart and no external callers; gone.
This commit is contained in:
@@ -21,17 +21,6 @@ export fn indexbyte(s: []u8, c: u8) (i32 | void) = {
|
||||
return;
|
||||
};
|
||||
|
||||
export fn copy(dst: []u8, src: []u8) i32 = {
|
||||
let n: i32 = dst.len;
|
||||
if (src.len < n) { n = src.len; };
|
||||
let i: i32 = 0;
|
||||
for (i < n) {
|
||||
dst[i] = src[i];
|
||||
i += 1;
|
||||
};
|
||||
return n;
|
||||
};
|
||||
|
||||
// index — first index of `sub` in `s`. Mirrors Hare's bytes::index
|
||||
// (the []u8 needle variant; the u8 needle stays as indexbyte until we
|
||||
// have union-arg dispatch). Empty `sub` matches at 0.
|
||||
|
||||
Reference in New Issue
Block a user