Tabnine Logo
StringBuilder.codePointCount
Code IndexAdd Tabnine to your IDE (free)

How to use
codePointCount
method
in
java.lang.StringBuilder

Best Java code snippets using java.lang.StringBuilder.codePointCount (Showing top 17 results out of 315)

origin: jp.dodododo/samurai-dao

public int codePointCount(int beginIndex, int endIndex) {
  return delegator.codePointCount(beginIndex, endIndex);
}
origin: com.github.javaito/hcjf

public int codePointCount(int beginIndex, int endIndex) {
  return builder.codePointCount(beginIndex, endIndex);
}
origin: me.soliveirajr/menta-bean

public int codePointCount(int beginIndex, int endIndex) {
  return sb.codePointCount(beginIndex, endIndex);
}
origin: com.jtransc/jtransc-rt

@Override
@JTranscAsync
public synchronized int codePointCount(int beginIndex, int endIndex) {
  return super.codePointCount(beginIndex, endIndex);
}
origin: org.python/jython

@Override
public TextFormatter pad() {
  // We'll need this many pad characters (if>0). Note Spec.UNDEFINED<0.
  int n = spec.width - result.codePointCount(mark, result.length());
  if (n > 0) {
    pad(mark, n);
  }
  return this;
}
origin: com.sqlapp/sqlapp-core

/**
 * 表示上の幅を取得します。
 * @param val
 */
public static int getDisplayWidth(StringBuilder val){
  if (val ==null){
    return 0;
  }
  int count=0;
  int i=0;
  int codePointLen=val.codePointCount(0, val.length());
  while(i<codePointLen){
    int codePoint=val.codePointAt(i++);
    if (isHalf(codePoint)){
      count++;
    } else{
      count=count+2;
    }
  }
  return count;
}
origin: org.apache.sis.core/sis-utility

/**
 * Returns the number of Unicode code points in the given characters sequence,
 * or 0 if {@code null}. Unpaired surrogates within the text count as one code
 * point each.
 *
 * @param  text  the character sequence from which to get the count, or {@code null}.
 * @return the number of Unicode code points, or 0 if the argument is {@code null}.
 *
 * @see #codePointCount(CharSequence, int, int)
 */
public static int codePointCount(final CharSequence text) {
  if (text == null)                  return 0;
  if (text instanceof String)        return ((String)        text).codePointCount(0, text.length());
  if (text instanceof StringBuilder) return ((StringBuilder) text).codePointCount(0, text.length());
  if (text instanceof StringBuffer)  return ((StringBuffer)  text).codePointCount(0, text.length());
  if (text instanceof CharBuffer) {
    final CharBuffer buffer = (CharBuffer) text;
    if (buffer.hasArray() && !buffer.isReadOnly()) {
      return Character.codePointCount(buffer.array(), buffer.position(), buffer.limit());
    }
  }
  return Character.codePointCount(text, 0, text.length());
}
origin: apache/sis

/**
 * Returns the number of Unicode code points in the given characters sequence,
 * or 0 if {@code null}. Unpaired surrogates within the text count as one code
 * point each.
 *
 * @param  text  the character sequence from which to get the count, or {@code null}.
 * @return the number of Unicode code points, or 0 if the argument is {@code null}.
 *
 * @see #codePointCount(CharSequence, int, int)
 */
public static int codePointCount(final CharSequence text) {
  if (text == null)                  return 0;
  if (text instanceof String)        return ((String)        text).codePointCount(0, text.length());
  if (text instanceof StringBuilder) return ((StringBuilder) text).codePointCount(0, text.length());
  if (text instanceof StringBuffer)  return ((StringBuffer)  text).codePointCount(0, text.length());
  if (text instanceof CharBuffer) {
    final CharBuffer buffer = (CharBuffer) text;
    if (buffer.hasArray() && !buffer.isReadOnly()) {
      return Character.codePointCount(buffer.array(), buffer.position(), buffer.limit());
    }
  }
  return Character.codePointCount(text, 0, text.length());
}
origin: rocks.xmpp/xmpp-extensions-client

  while (i < sb.codePointCount(0, sb.length()) && i < pos) {
    charCount += Character.charCount(sb.codePointAt(charCount));
    i++;
while (i < sb.codePointCount(0, sb.length()) && i < pos) {
  if (i++ < pos - n) {
    startIndex += Character.charCount(sb.codePointAt(startIndex));
origin: org.apache.sis.core/sis-utility

if (text == null)                  return 0;
if (text instanceof String)        return ((String)        text).codePointCount(fromIndex, toIndex);
if (text instanceof StringBuilder) return ((StringBuilder) text).codePointCount(fromIndex, toIndex);
if (text instanceof StringBuffer)  return ((StringBuffer)  text).codePointCount(fromIndex, toIndex);
if (text instanceof CharBuffer) {
origin: apache/sis

if (text == null)                  return 0;
if (text instanceof String)        return ((String)        text).codePointCount(fromIndex, toIndex);
if (text instanceof StringBuilder) return ((StringBuilder) text).codePointCount(fromIndex, toIndex);
if (text instanceof StringBuffer)  return ((StringBuffer)  text).codePointCount(fromIndex, toIndex);
if (text instanceof CharBuffer) {
origin: apache/sis

codePointCount  = buffer.codePointCount(0, printableLength);
onLineBegin(true);
origin: org.apache.sis.core/sis-utility

codePointCount  = buffer.codePointCount(0, printableLength);
onLineBegin(true);
origin: omegat-org/omegat

int getBreakPos(Token[] tokens) {
  if (str.codePointCount(0, str.length()) <= maxLineLength) {
  if (str.codePointCount(0, latestNonSpacesTokenPos) <= maxLineLength) {
    return str.length();
    if (str.codePointCount(0, t.getOffset()) >= lineLength) {
      if (spacesStart >= 0 && str.codePointCount(0, spacesStart) < maxLineLength) {
        return t.getOffset();
    int cps = str.codePointCount(0, t.getOffset());
    if (cps >= lineLength && cps < maxLineLength) {
      if (isSpaces(t)) {
    cps = str.codePointCount(0, t.getOffset() + t.getLength());
    if (cps >= lineLength && cps < maxLineLength) {
      if (isSpaces(t)) {
    int cps = str.codePointCount(0, t.getOffset());
    if (cps >= lineLength && cps < maxLineLength) {
      if (isPossibleBreakBefore(t.getOffset())) {
    cps = str.codePointCount(0, t.getOffset() + t.getLength());
    if (cps >= lineLength && cps < maxLineLength) {
      if (isPossibleBreakBefore(t.getOffset() + t.getLength())) {
    if (str.codePointCount(0, t.getOffset()) >= lineLength) {
      if (i == 0) {
        return t.getOffset() + t.getLength();
origin: eclipse/rdf4j

c = previousChar;
prefix.setLength(prefix.length() - 1);
previousChar = prefix.codePointAt(prefix.codePointCount(0, prefix.length()) - 1);
origin: org.eclipse.rdf4j/rdf4j-client

c = previousChar;
prefix.setLength(prefix.length() - 1);
previousChar = prefix.codePointAt(prefix.codePointCount(0, prefix.length()) - 1);
origin: smola/galimatias

for (int i = 0; i < buffer.codePointCount(0, buffer.length()); i++) {
  final int otherChar = buffer.codePointAt(i);
  final char startChar = buffer.charAt(i);
java.langStringBuildercodePointCount

Popular methods of StringBuilder

  • append
  • toString
  • <init>
    Constructs a string builder initialized to the contents of the specified string. The initial capacit
  • length
  • setLength
  • charAt
  • deleteCharAt
  • insert
  • substring
  • delete
  • replace
  • setCharAt
  • replace,
  • setCharAt,
  • indexOf,
  • lastIndexOf,
  • reverse,
  • appendCodePoint,
  • getChars,
  • subSequence,
  • ensureCapacity,
  • trimToSize

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Reference (javax.naming)
  • Table (org.hibernate.mapping)
    A relational table
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now