uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/utils/TypeComplianceConverterImpl.java [41:58]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static String replace(String aSourceString, String aPattern, String aReplaceString) {
    int offset = 0;
    int e = 0;
    StringBuffer convertedString = new StringBuffer();
    // while pattern exists in the source String
    // get a start position of pattern in String
    while ((e = aSourceString.indexOf(aPattern, offset)) >= 0) {
      // copy chars until the pattern
      convertedString.append(aSourceString.substring(offset, e));
      // replace the pattern
      convertedString.append(aReplaceString);
      // Skip the lenght of the pattern
      offset = e + aPattern.length();
    }
    // copy remaining
    convertedString.append(aSourceString.substring(offset));
    return convertedString.toString();
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



uimaj-core/src/main/java/org/apache/uima/internal/util/StringUtils.java [78:95]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static String replaceAll(String aSourceString, String aPattern, String aReplaceString) {
    int offset = 0;
    int e = 0;
    StringBuffer convertedString = new StringBuffer();
    // while pattern exists in the source String
    // get a start position of pattern in String
    while ((e = aSourceString.indexOf(aPattern, offset)) >= 0) {
      // copy chars until the pattern
      convertedString.append(aSourceString.substring(offset, e));
      // replace the pattern
      convertedString.append(aReplaceString);
      // Skip the lenght of the pattern
      offset = e + aPattern.length();
    }
    // copy remaining
    convertedString.append(aSourceString.substring(offset));
    return convertedString.toString();
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



