code: public static String stripNewLineChar(String pString) {
          String tmpFidValue = pString;
          StringTokenizer aTokenizer = new StringTokenizer(pString, "\n");
          if (aTokenizer.countTokens() > 1) {
              StringBuffer nameBuffer = new StringBuffer();
              while (aTokenizer.hasMoreTokens()) {
                  nameBuffer.append(aTokenizer.nextToken());
              }
              tmpFidValue = nameBuffer.toString();
          }
          return tmpFidValue;
      }
docs: This method strips out all new line characters from the passed String.
  
  @param pString A String value.
  
  @return A clean String.
  
  @see StringTokenizer