code: private int[] findIndices(final Literal literal) {
  
          int count = 0;
          final char s = literal.getFirstChar();
          for (int i = 0; i < myChars.length; i++) {
  
              // Check the first char for better performance and check the complete string
              if ((myChars[i] == s || s == '?') && literal.matches(myChars, i)) {
  
                  // This index matches
                  myBuffer[count] = i;
                  count++;
              }
          }
  
          // Check whether any match has been found
          if (count == 0) {
              return EMPTY;
          }
  
          // Use an existing array
          if (count == 1 && myBuffer[0] < SINGLE_VALUES.length) {
              final int index = myBuffer[0];
              return SINGLE_VALUES[index];
          }
  
          // Copy the values
          final int[] values = new int[count];
          for (int i = 0; i < count; i++) {
              values[i] = myBuffer[i];
          }
          return values;
      }
docs: Returns all indices where the literal argument can be found in this String.
  @param literal The string that should be found
  @return all indices where the literal argument can be found in this String.