com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class WordSeparators



  • public final class WordSeparators
    extends Object

    Provides the functionality to check whether character is a separator.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static WordSeparators DEFAULT
      A default collection of separators.
    • Constructor Summary

      Constructors 
      Constructor and Description
      WordSeparators(char[] separators)
      Initializes a new instance of the WordSeparators class.
    • Field Detail

      • DEFAULT

        public static final WordSeparators DEFAULT

        A default collection of separators.

    • Constructor Detail

      • WordSeparators

        public WordSeparators(char[] separators)

        Initializes a new instance of the WordSeparators class.

        Parameters:
        separators - A custom collection of separators.
    • Method Detail

      • isSeparator

        public boolean isSeparator(char character)

        Checks if character is a separator .

        Parameters:
        character - A character to check.
        Returns:
        A boolean true if character is separator; otherwise, false.
      • isWordStart

        public boolean isWordStart(String text,
                          int index)

        Checks if character at index position in text is the first in the word.

        Parameters:
        text - A string with the text.
        index - The zero-based position of the character.
        Returns:
        A boolean true if character is the first in the word; otherwise, false.
      • isWordEnd

        public boolean isWordEnd(String text,
                        int index)

        Checks if character at index position in text is the last in the word.

        Parameters:
        text - A string with the text.
        index - The zero-based position of the character.
        Returns:
        A boolean true if character is the last in the word; otherwise, false.