summaryrefslogtreecommitdiff
path: root/test/strstrip.myr
diff options
context:
space:
mode:
Diffstat (limited to 'test/strstrip.myr')
-rw-r--r--test/strstrip.myr23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/strstrip.myr b/test/strstrip.myr
new file mode 100644
index 0000000..c813013
--- /dev/null
+++ b/test/strstrip.myr
@@ -0,0 +1,23 @@
+use std
+
+const main = {
+ std.put("\"%s\"\n", std.strstrip(" abc "))
+ std.put("\"%s\"\n", std.strfstrip(" abc "))
+ std.put("\"%s\"\n", std.strrstrip(" abc "))
+
+ std.put("--\n")
+ std.put("\"%s\"\n", std.strstrip(" 世界 "))
+ std.put("\"%s\"\n", std.strfstrip(" 世界 "))
+ std.put("\"%s\"\n", std.strrstrip(" 世界 "))
+
+ std.put("--\n")
+ std.put("\"%s\"\n", std.strstrip(" "))
+ std.put("\"%s\"\n", std.strfstrip(" "))
+ std.put("\"%s\"\n", std.strrstrip(" "))
+
+ std.put("--\n")
+ std.put("\"%s\"\n", std.strstrip(""))
+ std.put("\"%s\"\n", std.strfstrip(""))
+ std.put("\"%s\"\n", std.strrstrip(""))
+ -> 0
+}