Java Char Convert To convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset)

Here you can find the source of convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset)

Description

Computes the code point offset for the specified character offset in the input string

License

Open Source License

Parameter

Parameter Description
inputStr a parameter
charOffset a parameter

Declaration

public static int convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from   ww  w.  ja va  2s. c om*/
     * Computes the code point offset for the specified character offset in the
     * input string
     * 
     * @param inputStr
     * @param charOffset
     * @return
     */
    public static int convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset) {
        return Character.codePointCount(inputStr, 0, charOffset);
    }
}

Related

  1. charToOctet(char c)
  2. charToUpperOrLower(String string, int pos, boolean upper)
  3. convertChar(char c)
  4. convertCharacter(final String value)
  5. convertCharacterEntity(String value)
  6. convertCharacters(String fileName)
  7. convertCharArray(char[] arr)
  8. convertCharArrayToIntArray(char[] chars)
  9. convertChars(String orig_name, String chars, char toChar)