org.apache.lucene.analysis.util

## Class StemmerUtil

- java.lang.Object
- - org.apache.lucene.analysis.util.StemmerUtil

-     public class StemmerUtil
      extends Object

  Some commonly-used stemming functions
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `delete(char[] s, int pos, int len)` Delete a character in-place
    `static int` | `deleteN(char[] s, int pos, int len, int nChars)` Delete n characters in-place
    `static boolean` | `endsWith(char[] s, int len, char[] suffix)` Returns true if the character array ends with the suffix.
    `static boolean` | `endsWith(char[] s, int len, String suffix)` Returns true if the character array ends with the suffix.
    `static boolean` | `startsWith(char[] s, int len, String prefix)` Returns true if the character array starts with the suffix.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### startsWith

          public static boolean startsWith(char[] s,
                                           int len,
                                           String prefix)

      Returns true if the character array starts with the suffix.
      Parameters:
        `s` - Input Buffer
        `len` - length of input buffer
        `prefix` - Prefix string to test
      Returns:
        true if `s` starts with `prefix`

    - #### endsWith

          public static boolean endsWith(char[] s,
                                         int len,
                                         String suffix)

      Returns true if the character array ends with the suffix.
      Parameters:
        `s` - Input Buffer
        `len` - length of input buffer
        `suffix` - Suffix string to test
      Returns:
        true if `s` ends with `suffix`

    - #### endsWith

          public static boolean endsWith(char[] s,
                                         int len,
                                         char[] suffix)

      Returns true if the character array ends with the suffix.
      Parameters:
        `s` - Input Buffer
        `len` - length of input buffer
        `suffix` - Suffix string to test
      Returns:
        true if `s` ends with `suffix`

    - #### delete

          public static int delete(char[] s,
                                   int pos,
                                   int len)

      Delete a character in-place
      Parameters:
        `s` - Input Buffer
        `pos` - Position of character to delete
        `len` - length of input buffer
      Returns:
        length of input buffer after deletion

    - #### deleteN

          public static int deleteN(char[] s,
                                    int pos,
                                    int len,
                                    int nChars)

      Delete n characters in-place
      Parameters:
        `s` - Input Buffer
        `pos` - Position of character to delete
        `len` - Length of input buffer
        `nChars` - number of characters to delete
      Returns:
        length of input buffer after deletion

Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.