为字符串类添点料,抛砖引玉,enjoy!
"".base.base := Strings
MsgBox, % "hello".len()
MsgBox, % "hello".add(" world")
str:="你好"
MsgBox % str.add("阿宽!")
MsgBox % str.equals("您好")
Class Strings {
len()
{
return StrLen(this)
}
add(str)
{
return this . str
}
equals(str)
{
if (!this || !str)
return !this && !str
return str = this
}
}