Merge pull request #5326 from roc-lang/dev-backend-list-map

Dev backend list map
This commit is contained in:
Folkert de Vries 2023-04-26 14:06:23 +02:00 committed by GitHub
commit 6d7e3ddc0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 908 additions and 339 deletions

View file

@ -133,6 +133,7 @@ comptime {
exportStrFn(str.countSegments, "count_segments");
exportStrFn(str.countGraphemeClusters, "count_grapheme_clusters");
exportStrFn(str.countUtf8Bytes, "count_utf8_bytes");
exportStrFn(str.isEmpty, "is_empty");
exportStrFn(str.getCapacity, "capacity");
exportStrFn(str.startsWith, "starts_with");
exportStrFn(str.startsWithScalar, "starts_with_scalar");

View file

@ -1525,6 +1525,10 @@ pub fn countUtf8Bytes(string: RocStr) callconv(.C) usize {
return string.len();
}
pub fn isEmpty(string: RocStr) callconv(.C) bool {
return string.isEmpty();
}
pub fn getCapacity(string: RocStr) callconv(.C) usize {
return string.getCapacity();
}