add string cloning helper

This commit is contained in:
Folkert 2022-07-23 00:08:01 +02:00
parent 53e7a41f27
commit ab3a431db7
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
5 changed files with 36 additions and 0 deletions

View file

@ -143,6 +143,7 @@ comptime {
exportStrFn(str.strTrim, "trim");
exportStrFn(str.strTrimLeft, "trim_left");
exportStrFn(str.strTrimRight, "trim_right");
exportStrFn(str.strCloneTo, "clone_to");
inline for (INTEGERS) |T| {
str.exportFromInt(T, ROC_BUILTINS ++ "." ++ STR ++ ".from_int.");