org.lirc
Class StringUtils

java.lang.Object
  |
  +--org.lirc.StringUtils

public class StringUtils
extends java.lang.Object

Contains some string utilities.

Version:
$Revision: 1.2 $
Author:
Bjorn Bringert (bjorn@mumblebee.com)

Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String chomp(java.lang.String str)
          Removes last character if it is a newline.
static java.lang.String[] split(char at, java.lang.String str)
          Splits the string at at.
static java.lang.String[] split(java.lang.String str)
          Splits the string at each space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

chomp

public static java.lang.String chomp(java.lang.String str)
Removes last character if it is a newline. Like Perl's chomp.

split

public static java.lang.String[] split(java.lang.String str)
Splits the string at each space. Like Perl split " " or Haskell words.
Returns:
an array of the words without spaces

split

public static java.lang.String[] split(char at,
                                       java.lang.String str)
Splits the string at at. Like Perl split.
Parameters:
at - the character to split at.