java.lang.StringBuilder.offsetByCodePoints()方法的使用及代码示例

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

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

StringBuilder.offsetByCodePoints介绍

暂无

代码示例

代码示例来源:origin: io.virtdata/virtdata-lib-realer

private void skipPrevious() {  // Requires 0<codePointStart.
  codePointLimit=codePointStart;
  codePointStart=str.offsetByCodePoints(codePointStart, -1);
}
private int previousCC() {  // Returns 0 if there is no previous character.

代码示例来源:origin: jp.dodododo/samurai-dao

public int offsetByCodePoints(int index, int codePointOffset) {
  return delegator.offsetByCodePoints(index, codePointOffset);
}

代码示例来源:origin: com.github.javaito/hcjf

public int offsetByCodePoints(int index, int codePointOffset) {
  return builder.offsetByCodePoints(index, codePointOffset);
}

代码示例来源:origin: me.soliveirajr/menta-bean

public int offsetByCodePoints(int index, int codePointOffset) {
  return sb.offsetByCodePoints(index, codePointOffset);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

int backwardNumCodePoints(int n) {
  int length = oldBuffer.length();
  int beyond = pos - length;
  if(beyond > 0) {
    if(beyond >= n) {
      // Not back far enough to re-enter the oldBuffer.
      pos -= n;
      return n;
    } else {
      // Back out all beyond-oldBuffer code points and re-enter the buffer.
      pos = oldBuffer.offsetByCodePoints(length, beyond - n);
      return beyond;
    }
  } else {
    // Go backwards from inside the oldBuffer.
    pos = oldBuffer.offsetByCodePoints(pos, -n);
    return 0;
  }
}

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

@Override
@JTranscAsync
public synchronized int offsetByCodePoints(int index, int codePointOffset) {
  return super.offsetByCodePoints(index, codePointOffset);
}

代码示例来源:origin: omegat-org/omegat

} else if ((cp == '>') && (tag.lastIndexOf("\\") != tag.offsetByCodePoints(tag.length(), -1))) {
  num++;
  Xtag oneTag = new Xtag(tag.toString(), num);

代码示例来源:origin: com.github.groupon.monsoon/monsoon-collector-base

for (int i = 0, next_i; i < result.length(); i = next_i) {
  final int code_point = result.codePointAt(i);
  next_i = result.offsetByCodePoints(i, 1);

代码示例来源:origin: org.jboss.jdeparser/jdeparser

for (int i = idx; i < b.length();) {
  c = b.codePointAt(i);
  end = b.offsetByCodePoints(i, 1);
  switch (c) {

代码示例来源:origin: groupon/monsoon

for (int i = 0, next_i; i < result.length(); i = next_i) {
  final int code_point = result.codePointAt(i);
  next_i = result.offsetByCodePoints(i, 1);

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-util

StringBuilder sb = new StringBuilder(str);
while (true) {
  int end = sb.offsetByCodePoints(problem, 1);
  String decoded = sb.substring(problem, end);
  String encoded = " ".equals(decoded) ? "%20" : URLEncoder.encode(decoded, "UTF-8");

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

StringBuilder sb = new StringBuilder(str);
while (true) {
  int end = sb.offsetByCodePoints(problem, 1);
  String decoded = sb.substring(problem, end);
  String encoded = " ".equals(decoded) ? "%20" : URLEncoder.encode(decoded, "UTF-8");

代码示例来源:origin: eclipse/rdf4j

StringBuilder sb = new StringBuilder(str);
while (true) {
  int end = sb.offsetByCodePoints(problem, 1);
  String decoded = sb.substring(problem, end);
  String encoded = " ".equals(decoded) ? "%20" : URLEncoder.encode(decoded, "UTF-8");

代码示例来源:origin: io.virtdata/virtdata-lib-realer

codeUnitIndex=dest.offsetByCodePoints(firstSupplementaryIndex, i-firstSupplementaryIndex);

相关文章