shithub: mc

ref: f88d2664b6c80eb13ae0041ba1713a57a384ca20
dir: /test/strstrip.myr/

View raw version
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(""))
}