src/main/java/org/jboss/seam/examples/seamcrm/tools/StringTools.java
public static String firstLine(String str)
    {
       Scanner s = new Scanner(str);

       if (s.hasNext())
       {
          return s.nextLine();
       }
       else
       {
          return str;
       }
    }
/**
     * Return the first line of a String
     * @param str
     * @return
     */
Return the first line of a String
@param str
@return
Return the first line of a String @param str @return
public static String firstLine(String str)
    {
       Scanner s = new Scanner(str);
       if (s.hasNext())
       {
          return s.nextLine();
       }
       else
       {
          return str;
       }
    }
public static String firstLine ( String str ) { Scanner s = new Scanner ( str ) ; if ( s . hasNext ( ) ) { return s . nextLine ( ) ; } else { return str ; } }
Return the first line of a String
 @param str
 @return
Return the first line of a String @param str @return