• 首页
  • 脚本说明
    • 脚本介绍
    • 第一个助码脚本程序
    • 常用类型哈希表
    • 常用类型哈希表集合
    • 常用类型字符串
    • 基本数字类型
    • 数据库操作
    • Excel操作
    • 模拟http请求
  • 通用基类
    • ZmHash
    • StringUtil
    • FlowDefine
    • FlowDefineLine
    • ZmHashList
    • FlowDefineStep
    • JobBase
    • IModelData
    • FrameController
    • FrameDao
    • FlowBase
    • ZmActiveRequest
    • ZmQueryConditionList
    • ZmQueryTable
    • ZmStr2StrHash
    • ZmReturnMsg
    • MainModel
    • ViewModelBase
    • ZmConfig
    • ZmListBase
    • ZmList
    • MapperBase
    • ZmServiceBase
    • ZmController
    • IZmServiceBase
    • ActionModelView
    • ZmPageData
    • ReturnMessage
    • ReturnData
    • SearchData
    • FrameFlow
  • 数据库操作
    • BaseProvider
    • ZmSqlParam
    • ZmSqlParamList
  • 工具函数
    • JsonHelper
    • HttpUtil
    • RandomUtil
    • VerificationCode
    • CryptUtil
    • ZmQRCode
    • SmsSenderHelper
    • ZmUtil
    • ExcelUtil
  • 首页
  • 脚本说明
    • 脚本介绍
    • 第一个助码脚本程序
    • 常用类型哈希表
    • 常用类型哈希表集合
    • 常用类型字符串
    • 基本数字类型
    • 数据库操作
    • Excel操作
    • 模拟http请求
  • 通用基类
    • ZmHash
    • StringUtil
    • FlowDefine
    • FlowDefineLine
    • ZmHashList
    • FlowDefineStep
    • JobBase
    • IModelData
    • FrameController
    • FrameDao
    • FlowBase
    • ZmActiveRequest
    • ZmQueryConditionList
    • ZmQueryTable
    • ZmStr2StrHash
    • ZmReturnMsg
    • MainModel
    • ViewModelBase
    • ZmConfig
    • ZmListBase
    • ZmList
    • MapperBase
    • ZmServiceBase
    • ZmController
    • IZmServiceBase
    • ActionModelView
    • ZmPageData
    • ReturnMessage
    • ReturnData
    • SearchData
    • FrameFlow
  • 数据库操作
    • BaseProvider
    • ZmSqlParam
    • ZmSqlParamList
  • 工具函数
    • JsonHelper
    • HttpUtil
    • RandomUtil
    • VerificationCode
    • CryptUtil
    • ZmQRCode
    • SmsSenderHelper
    • ZmUtil
    • ExcelUtil
StringUtil
字符串(String)的工具类,封装常用字符串的操作 成员函数: IsNullOrEmpty 判断传入的字符串是否为空或者null 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | 返回值: Boolean 如果为空或者空字符串返回值Boolean true,否之返回false NewGuidString 获取32位的guid,长度32中间无- 返回值: String 32位的guid ToLower 将传入的字符串变为小写 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | 返回值: String 小写的字符串 ToUpper 将传入的字符串变为大写 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | 返回值: String 大写的字符串 Trim 去除字符串前后的空格 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | 返回值: String 去除前后空格的字符串 Split 根据传入的分隔符,分割传入的字符串 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | separator| String | 分隔符 | | str| String | 字符串 | 返回值: ZmStringList 分割后的字符串列表 Contains 判断字符串(str)中是否包含另一格字符串(val) 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 传入的字符串 | | val| String | 包含的字符串 | 返回值: Boolean 是否包含Boolean值 Equal 判断两个字符串的值是否相等 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串1 | | val| String | 字符串2 | 返回值: Boolean 相等返回true否之false NoCaseEqual 判断两个字符串忽略大小写后的值是否相等 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串1 | | val| String | 字符串2 | 返回值: Boolean 相等返回true否之false IndexOf 判断传入find在str中的位置 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | | find| String | 子字符串 | 返回值: Int 字符串find在str中的索引,从0开始,如果不存在返回-1 StrLength 求传入字符串的长度 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | 返回值: Int 字符串的长度 LastIndexOf 判断传入find在str中的位置,从后往前查找 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | | find| String | 子字符串 | 返回值: Int 字符串find在str中的索引,从0开始,如果不存在返回-1 Replace 把字符串str中的find替换为replacel 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | | find| String | 要查找的字符串 | | replacel| String | 替换为字符串 | 返回值: String 替换后的字符串 SubString 根据开始位置和长度截取字符串 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | | start| Int | 开始位置 | | length| Int | 长度 | 返回值: String 截取后的字符串 StringToByteArray 把字符串按照传入的字符串编码转换为字节byte数组 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | | charset| String | 字符串编码 如utf-8等 | 返回值: ByteArray 转换后的字节数组 ByteArrayToString 把字节数组按照传入的字符串编码转换为字符串 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | bytes| ByteArray | 字节byte数组 | | charset| String | 字符串编码 如utf-8等 | 返回值: String 转换后的字符串 StringToByteArrayUTF8 把字符串按照UTF8编码转换为字节byte数组 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | str| String | 字符串 | 返回值: ByteArray 转换后的字节数组 ByteArrayToStringUTF8 把字节数组按照UTF8编码转换为字符串 参数: | 名称 | 类型 | 说明 | | -------- | -----: | :----: | | bytes| ByteArray | 字节byte数组 | 返回值: String 转换后的字符串 其它说明: 无
上一篇:ZmHash
下一篇:FlowDefine
联系电话:17321408562 上海洽发信息科技有限公司 张经理 2022 上海洽发 沪ICP备16029095号-6