[FUNC]为字符串类添点料

来源:互联网 发布:matlab智能算法目录 编辑:程序博客网 时间:2024/06/05 22:45

为字符串类添点料,抛砖引玉,enjoy!

"".base.base := StringsMsgBox, % "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 && !strreturn str = this}}


原创粉丝点击