java.lang.Object
net.fellbaum.jemoji.IndexedEmoji
Represents an emoji with character and codepoint indexes.
-
Method Summary
Modifier and TypeMethodDescriptionintGets the character index at which the emoji starts.intGets the codepoint index at which the emoji starts.getEmoji()Gets the capturedemoji.intGets the character index at which the emoji ends.intGets the codepoint index at which the emoji ends.toString()
-
Method Details
-
getEmoji
Gets the capturedemoji.- Returns:
- The captured emoji.
-
getCharIndex
public int getCharIndex()Gets the character index at which the emoji starts.The index is included in
0 < input <= input.length() - 1- Returns:
- The character index at which the emoji starts.
-
getCodePointIndex
public int getCodePointIndex()Gets the codepoint index at which the emoji starts.This must not be confused with
getCharIndex(), a codepoint can contain one or two characters, which means the codepoint index will likely be lower than the character index.- Returns:
- The character index at which the emoji starts.
-
getEndCharIndex
public int getEndCharIndex()Gets the character index at which the emoji ends.The index is included in
0 < input <= input.length() - 1- Returns:
- The character index at which the emoji ends.
-
getEndCodePointIndex
public int getEndCodePointIndex()Gets the codepoint index at which the emoji ends.This must not be confused with
getEndCharIndex(), a codepoint can contain one or two characters, which means the codepoint index will likely be lower than the character index.- Returns:
- The character index at which the emoji ends.
-
toString
-