点击或拖拽改变大小

StringEx 类

Sweet 开发框架
字符串扩展类
继承层次
SystemObject
  Sweet.CommonStringEx

命名空间:  Sweet.Common
程序集:  Sweet.Common (在 Sweet.Common.dll 中) 版本:3.10.1.0 (3.10.1.0)
语法
public static class StringEx

StringEx 类型公开以下成员。

方法
  名称说明
公共方法静态成员After
Gets the string after the given string parameter.
公共方法静态成员Base64Decode(String)
Decodes a Base 64 encoded value to a string using the default encoding.
公共方法静态成员Base64Decode(String, Encoding)
Decodes a Base 64 encoded value to a string using the supplied encoding.
公共方法静态成员Base64Encode(String)
Encodes the input value to a Base64 string using the default encoding.
公共方法静态成员Base64Encode(String, Encoding)
Encodes the input value to a Base64 string using the supplied encoding.
公共方法静态成员Before
Gets the string before the given string parameter.
公共方法静态成员Between
Gets the string between the given string parameters.
公共方法静态成员DealPath
处理文件夹名称末尾加文件夹分隔符(windows为\,linux为/)
公共方法静态成员DesDecrypt
DES解密
公共方法静态成员DesEncrypt
DES加密
公共方法静态成员EqualsIgnoreCase(String, String)
忽略大小写的字符串相等比较,判断是否以任意一个待比较字符串相等
公共方法静态成员EqualsIgnoreCase(String, String)
忽略大小写的字符串相等比较,判断是否以任意一个待比较字符串相等
公共方法静态成员FormatString
浮点数的格式化字符串(例如:0.00)
公共方法静态成员GZipCompress
压缩字符串
公共方法静态成员GZipDecompress
解压缩字符串
公共方法静态成员HasCnChar
检测是否有中文字符
公共方法静态成员IfEmpty
字符串为空时返回缺省值,不为空时直接返回原字符串
公共方法静态成员IsBoolean
是否是布尔字符串
公共方法静态成员IsByte
是否是Byte字符串
公共方法静态成员IsChar
是否是Char字符串
公共方法静态成员IsDateTime
是否是日期字符串
公共方法静态成员IsDecimal
是否是Decima字符串
公共方法静态成员IsDouble
是否是Double字符串
公共方法静态成员IsFloat
是否是Float字符串转换
公共方法静态成员IsGuid
是否是Guid字符串
公共方法静态成员IsInt
是否是Int字符串
公共方法静态成员IsIP4
字符串是否为IP地址
公共方法静态成员IsLong
是否是Long字符串
公共方法静态成员IsMail
检测输入的邮件地址是否合法,非法则返回true。
公共方法静态成员IsNameSpace
是否是命名空间
公共方法静态成员IsNullOrEmpty
指示指定的字符串是 null还是 Empty 字符串。
公共方法静态成员IsNullOrWhiteSpace
指示指定的字符串是 null、空还是仅由空白字符组成。
公共方法静态成员IsNumber
是否数字字符串
公共方法静态成员IsNumberWithSign
是否数字字符串 可带正负号
公共方法静态成员IsPureEnglishChar
是否是纯英文字母
公共方法静态成员IsSByte
是否是SByte字符串
公共方法静态成员IsShort
是否是Short字符串
公共方法静态成员IsUInt
是否是UInt字符串
公共方法静态成员IsULong
是否是ULong字符串
公共方法静态成员IsUShort
是否是UShort字符串
公共方法静态成员IsValid
指示指定的字符串是 null还是 Empty 字符串。
公共方法静态成员Left
字符串左侧按长度截取后的字符串
公共方法静态成员Md5String
使用utf8编码将字符串散列
公共方法静态成员Middle
字符串中间按长度截取后的字符串
公共方法静态成员MyDecrypt
DES解密
公共方法静态成员MyEncrypt
DES加密
公共方法静态成员RemoveLeft
Return the string with the leftmost number_of_characters characters removed.
公共方法静态成员RemoveRight
Return the string with the rightmost number_of_characters characters removed.
公共方法静态成员Repet
字符串重复显示
公共方法静态成员Reverse
字符串反转
公共方法静态成员Right
字符串右侧按长度截取后的字符串
公共方法静态成员SHA1Hash
Calculates the SHA1 hash of the supplied string and returns a base 64 string.
公共方法静态成员Split
分割字符串
公共方法静态成员SplitBeforeLast
以分隔符分割的最后一个字符串之前的字符串
公共方法静态成员SplitFirst
以分隔符分割后的第一个字符串
公共方法静态成员SplitIndex
返回字符串分割后指定索引的字符串
公共方法静态成员SplitLast
以分隔符分割后的最后一个字符串
公共方法静态成员SplitSeparatorCount
字符串包含分隔符的个数
公共方法静态成员ToBoolean
字符串转换
公共方法静态成员ToByte
字符串转换
公共方法静态成员ToChar
字符串转换
公共方法静态成员ToDateTime(String, DateTime)
字符串转换
公共方法静态成员ToDateTime(String, String)
字符串转换为日期
公共方法静态成员ToDateTimeEx
字符串转换为日期
公共方法静态成员ToDecimal
字符串转换
公共方法静态成员ToDouble
字符串转换
公共方法静态成员ToEnBytes
英文字符串转换为ASCII编码的数组
公共方法静态成员ToEncodeBytes
字符串按指定编码转换为数组
公共方法静态成员ToEncodeString
数组按指定编码转换为字符串
公共方法静态成员ToEnString
ASCII编码的数组转换为英文字符串
公共方法静态成员ToFloat
字符串转换
公共方法静态成员ToGuid
字符串转换
公共方法静态成员ToInt
字符串转换
公共方法静态成员ToLong
字符串转换
公共方法静态成员ToSByte
字符串转换
公共方法静态成员ToSecureString
Converts a regular string into SecureString
公共方法静态成员ToShort
字符串转换
公共方法静态成员ToUInt
字符串转换
公共方法静态成员ToULong
字符串转换
公共方法静态成员ToUnSecureString
Coverts the SecureString to a regular string.
公共方法静态成员ToUShort
字符串转换
公共方法静态成员TrimToMaxLength
截取指定长度的字符串
Top
字段
  名称说明
公共字段静态成员DefaultCryptString
默认加密密码
公共字段静态成员StructLayoutString
结果序列化字符串 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
Top
参见
SweetUI 控件库、工具类库、扩展类库、多页面开发框架