java.lang.String._getChars()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(218)

本文整理了Java中java.lang.String._getChars()方法的一些代码示例,展示了String._getChars()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。String._getChars()方法的具体详情如下:
包路径:java.lang.String
类名称:String
方法名:_getChars

String._getChars介绍

[英]Version of getChars without bounds checks, for use by other classes within the java.lang package only. The caller is responsible for ensuring that start >= 0 && start
[中]getChars无边界检查的版本,供java中的其他类使用。只有朗包。调用者负责确保start>=0&&start

代码示例

代码示例来源:origin: robovm/robovm

AbstractStringBuilder(String string) {
  count = string.length();
  shared = false;
  value = new char[count + INITIAL_CAPACITY];
  string._getChars(0, count, value, 0);
}

代码示例来源:origin: robovm/robovm

final void append0(String string) {
  if (string == null) {
    appendNull();
    return;
  }
  int length = string.length();
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  }
  string._getChars(0, length, value, count);
  count = newCount;
}

代码示例来源:origin: robovm/robovm

final void insert0(int index, String string) {
  if (index >= 0 && index <= count) {
    if (string == null) {
      string = "null";
    }
    int min = string.length();
    if (min != 0) {
      move(min, index);
      string._getChars(0, min, value, index);
      count += min;
    }
  } else {
    throw indexAndLength(index);
  }
}

代码示例来源:origin: robovm/robovm

final void append0(CharSequence s, int start, int end) {
  if (s == null) {
    s = "null";
  }
  if ((start | end) < 0 || start > end || end > s.length()) {
    throw new IndexOutOfBoundsException();
  }
  int length = end - start;
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  } else if (shared) {
    value = value.clone();
    shared = false;
  }
  if (s instanceof String) {
    ((String) s)._getChars(start, end, value, count);
  } else if (s instanceof AbstractStringBuilder) {
    AbstractStringBuilder other = (AbstractStringBuilder) s;
    System.arraycopy(other.value, start, value, count, length);
  } else {
    int j = count; // Destination index.
    for (int i = start; i < end; i++) {
      value[j++] = s.charAt(i);
    }
  }
  this.count = newCount;
}

代码示例来源:origin: robovm/robovm

shared = false;
string._getChars(0, stringLength, value, start);
count -= diff;
return;

代码示例来源:origin: com.gluonhq/robovm-rt

AbstractStringBuilder(String string) {
  count = string.length();
  shared = false;
  value = new char[count + INITIAL_CAPACITY];
  string._getChars(0, count, value, 0);
}

代码示例来源:origin: ibinti/bugvm

AbstractStringBuilder(String string) {
  count = string.length();
  shared = false;
  value = new char[count + INITIAL_CAPACITY];
  string._getChars(0, count, value, 0);
}

代码示例来源:origin: MobiVM/robovm

AbstractStringBuilder(String string) {
  count = string.length();
  shared = false;
  value = new char[count + INITIAL_CAPACITY];
  string._getChars(0, count, value, 0);
}

代码示例来源:origin: FlexoVM/flexovm

AbstractStringBuilder(String string) {
  count = string.length();
  shared = false;
  value = new char[count + INITIAL_CAPACITY];
  string._getChars(0, count, value, 0);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

AbstractStringBuilder(String string) {
  count = string.length();
  shared = false;
  value = new char[count + INITIAL_CAPACITY];
  string._getChars(0, count, value, 0);
}

代码示例来源:origin: com.bugvm/bugvm-rt

AbstractStringBuilder(String string) {
  count = string.length();
  shared = false;
  value = new char[count + INITIAL_CAPACITY];
  string._getChars(0, count, value, 0);
}

代码示例来源:origin: ibinti/bugvm

final void append0(String string) {
  if (string == null) {
    appendNull();
    return;
  }
  int length = string.length();
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  }
  string._getChars(0, length, value, count);
  count = newCount;
}

代码示例来源:origin: MobiVM/robovm

final void append0(String string) {
  if (string == null) {
    appendNull();
    return;
  }
  int length = string.length();
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  }
  string._getChars(0, length, value, count);
  count = newCount;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

final void append0(String string) {
  if (string == null) {
    appendNull();
    return;
  }
  int length = string.length();
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  }
  string._getChars(0, length, value, count);
  count = newCount;
}

代码示例来源:origin: FlexoVM/flexovm

final void append0(String string) {
  if (string == null) {
    appendNull();
    return;
  }
  int length = string.length();
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  }
  string._getChars(0, length, value, count);
  count = newCount;
}

代码示例来源:origin: com.bugvm/bugvm-rt

final void append0(String string) {
  if (string == null) {
    appendNull();
    return;
  }
  int length = string.length();
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  }
  string._getChars(0, length, value, count);
  count = newCount;
}

代码示例来源:origin: com.gluonhq/robovm-rt

final void append0(String string) {
  if (string == null) {
    appendNull();
    return;
  }
  int length = string.length();
  int newCount = count + length;
  if (newCount > value.length) {
    enlargeBuffer(newCount);
  }
  string._getChars(0, length, value, count);
  count = newCount;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

final void insert0(int index, String string) {
  if (index >= 0 && index <= count) {
    if (string == null) {
      string = "null";
    }
    int min = string.length();
    if (min != 0) {
      move(min, index);
      string._getChars(0, min, value, index);
      count += min;
    }
  } else {
    throw indexAndLength(index);
  }
}

代码示例来源:origin: ibinti/bugvm

final void insert0(int index, String string) {
  if (index >= 0 && index <= count) {
    if (string == null) {
      string = "null";
    }
    int min = string.length();
    if (min != 0) {
      move(min, index);
      string._getChars(0, min, value, index);
      count += min;
    }
  } else {
    throw indexAndLength(index);
  }
}

代码示例来源:origin: com.bugvm/bugvm-rt

final void insert0(int index, String string) {
  if (index >= 0 && index <= count) {
    if (string == null) {
      string = "null";
    }
    int min = string.length();
    if (min != 0) {
      move(min, index);
      string._getChars(0, min, value, index);
      count += min;
    }
  } else {
    throw indexAndLength(index);
  }
}

相关文章