// Path: src/com/swabunga/util/StringUtility.java
// public class StringUtility {
//   public static StringBuffer replace(StringBuffer buf, int start, int end, String text) {
//     int len = text.length();
//     char[] ch = new char[buf.length() + len - (end - start)];
//     buf.getChars(0, start, ch, 0);
//     text.getChars(0, len, ch, start);
//     buf.getChars(end, buf.length(), ch, start + len);
//     buf.setLength(0);
//     buf.append(ch);
//     return buf;
//   }
// 
//   public static void main(String[] args) {
//     System.out.println(StringUtility.replace(new StringBuffer(args[0]), Integer.parseInt(args[2]), Integer.parseInt(args[3]), args[1]));
//   }
// }


import java.util.HashMap;
import java.util.Vector;
import com.swabunga.util.StringUtility;
import java.io.*;
  }

  /**
   * Builds up an char array with the chars in the alphabet of the language as it was read from the
   * alphabet tag in the phonetic file.
   * @return char[] An array of chars representing the alphabet or null if no alphabet was available.
   */
  public char[] getReplaceList() {
    return alphabetString;
  }

  /**
   * Builds the phonetic code of the word.
   * @param word the word to transform
   * @return the phonetic transformation of the word
   */
  public String transform(String word) {

    if (ruleArray == null)
      return null;

    TransformationRule rule;
    StringBuffer str = new StringBuffer(word.toUpperCase());
    int strLength = str.length();
    int startPos = 0, add = 1;

    while (startPos < strLength) {

      add = 1;
      if (Character.isDigit(str.charAt(startPos))) {
// Path: src/com/swabunga/util/StringUtility.java
// public class StringUtility {
//   public static StringBuffer replace(StringBuffer buf, int start, int end, String text) {
//     int len = text.length();
//     char[] ch = new char[buf.length() + len - (end - start)];
//     buf.getChars(0, start, ch, 0);
//     text.getChars(0, len, ch, start);
//     buf.getChars(end, buf.length(), ch, start + len);
//     buf.setLength(0);
//     buf.append(ch);
//     return buf;
//   }
// 
//   public static void main(String[] args) {
//     System.out.println(StringUtility.replace(new StringBuffer(args[0]), Integer.parseInt(args[2]), Integer.parseInt(args[3]), args[1]));
//   }
// }


// Path: src/com/swabunga/spell/engine/GenericTransformator.java
import java.util.HashMap;
import java.util.Vector;
import com.swabunga.util.StringUtility;
import java.io.*;

  }

  /**
   * Builds up an char array with the chars in the alphabet of the language as it was read from the
   * alphabet tag in the phonetic file.
   * @return char[] An array of chars representing the alphabet or null if no alphabet was available.
   */
  public char[] getReplaceList() {
    return alphabetString;
  }

  /**
   * Builds the phonetic code of the word.
   * @param word the word to transform
   * @return the phonetic transformation of the word
   */
  public String transform(String word) {

    if (ruleArray == null)
      return null;

    TransformationRule rule;
    StringBuffer str = new StringBuffer(word.toUpperCase());
    int strLength = str.length();
    int startPos = 0, add = 1;

    while (startPos < strLength) {

      add = 1;
      if (Character.isDigit(str.charAt(startPos))) {
        StringUtility.replace(str, startPos, startPos + DIGITCODE.length(), DIGITCODE);