Class IndexedEmoji

java.lang.Object
net.fellbaum.jemoji.IndexedEmoji

public final class IndexedEmoji extends Object
Represents an emoji with character and codepoint indexes.
  • Method Details

    • getEmoji

      public Emoji getEmoji()
      Gets the captured emoji.
      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

      public String toString()
      Overrides:
      toString in class Object