类 MStr

java.lang.Object
com.gdxsoft.easyweb.utils.msnet.MStr
所有已实现的接口:
Serializable

public class MStr extends Object implements Serializable
兼容的StringBuilder 对象
作者:
Administrator
另请参阅:
  • 构造器详细资料

    • MStr

      public MStr()
    • MStr

      public MStr(Object val)
  • 方法详细资料

    • length

      public int length()
    • setLength

      public void setLength(int length)
    • reset

      public void reset()
    • a

      public MStr a(Object val)
      添加内容 = append
      参数:
      val - 内容
      返回:
      this
    • append

      public MStr append(Object val)
      添加内容
      参数:
      val - 内容
      返回:
      this
    • appendLine

      public MStr appendLine(Object val)
      添加内容,并在结尾添加新行(newLine),默认\r\n
      参数:
      val - 内容
      返回:
      this
    • al

      public MStr al(Object val)
      添加内容,并在结尾添加新行(newLine),默认\r\n = appendLine
      参数:
      val - 内容
      返回:
      this
    • indexOf

      public int indexOf(String val)
      查找字符串位置
      参数:
      val - 字符串
      返回:
    • indexOf

      public int indexOf(String val, int start)
      查找字符串位置
      参数:
      val - 字符串
      start - 开始位置
      返回:
    • substring

      public MStr substring(int startIndex)
      提取字符串
      参数:
      startIndex - 开始位置
      返回:
      提取的字符串
    • substring

      public String substring(int startIndex, int endIndex)
      提取字符串
      参数:
      startIndex - 开始位置
      endIndex - 结束位置
      返回:
      提取的字符串
    • delete

      public MStr delete(int startIndex, int endIndex)
      删除字符串
      参数:
      startIndex - 开始位置
      endIndex - 结束位置
      返回:
      this
    • insert

      public MStr insert(int index, Object val)
      插入字符串
      参数:
      index - 位置
      val - 字符串
      返回:
      this
    • replace

      public MStr replace(String find, String val)
      只替换一次
      参数:
      find -
      val -
      返回:
      this
    • toString

      public String toString()
      返回字符串
      覆盖:
      toString 在类中 Object
      返回:
      string
    • getNewLine

      public String getNewLine()
      新行字符串,默认是\r\n
      返回:
      the newLine
    • setNewLine

      public void setNewLine(String newLine)
      设置新行字符串,默认是\r\n
      参数:
      newLine - the newLine to set