def SplitStr( s, sep ):
  """Split a string into tokens.

  Params:
     s - the string to split
     sep - the separator; if equal to 'whitespace', split on whitespace.
  """
  return s.split( sep if sep != 'whitespace' else None )