All pastes #265946 Raw Edit

qooper

public java v1 · immutable
·published 2006-12-03 19:56 UTC
rendered paste body
public class Jibberish{  public static void main(String[] args)  {    StringBuffer text = new StringBuffer(args[0]);    toJibberish(text);    System.out.print(text);    return;  }  /**   * AE: (text != null) & (text.length() > 0)   */  public static void toJibberish(StringBuffer text)  {    for (int i = 0; i < text.length(); i++)      switch (text.charAt(i))      {        case 'Å': text.setCharAt(i, 'A'); break;        case 'å': text.setCharAt(i, 'a'); break;        case 'Ä': text.setCharAt(i, 'A'); break;        case 'ä': text.setCharAt(i, 'a'); break;        case 'Ö': text.setCharAt(i, 'O'); break;        case 'ö': text.setCharAt(i, 'o'); break;        default:      }    text = text.reverse();    return;  }}