mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Merge branch 'trunk' of github.com:rtfeldman/roc into dict
This commit is contained in:
commit
c7f6de2afe
93 changed files with 6706 additions and 5317 deletions
|
@ -29,6 +29,7 @@ comptime {
|
|||
exportStrFn(str.strConcatC, "concat");
|
||||
exportStrFn(str.strNumberOfBytes, "number_of_bytes");
|
||||
exportStrFn(str.strFromIntC, "from_int");
|
||||
exportStrFn(str.strEqual, "equal");
|
||||
}
|
||||
|
||||
// Export helpers - Must be run inside a comptime
|
||||
|
|
|
@ -260,6 +260,11 @@ pub const RocStr = extern struct {
|
|||
}
|
||||
};
|
||||
|
||||
// Str.equal
|
||||
pub fn strEqual(self: RocStr, other: RocStr) callconv(.C) bool {
|
||||
return self.eq(other);
|
||||
}
|
||||
|
||||
// Str.numberOfBytes
|
||||
pub fn strNumberOfBytes(string: RocStr) callconv(.C) usize {
|
||||
return string.len();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue