net.liftweb.util.HttpHelpers

object HttpHelpers

object HttpHelpers

 extends ListHelpers with StringHelpers




Companion: HttpHelpers

Source: HttpHelpers.scala(24)

 Constructors

def this

 Methods

!= final def !=(arg0 : Any) Boolean Any
!= final def !=(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Any) Boolean Any
asInstanceOf final def asInstanceOf[T0] T0 Any
capify def capify(in : String)
Capitalize every "word" in the string [details]
A word is either separated by spaces or underscores.
param
in - string to capify
return
- the capified string
String StringHelpers
clean def clean(in : String)
Remove all the characters from a string exception a-z, A-Z, 0-9, and '_' [details]
return
- the cleaned string and an empty string if the input is null
String StringHelpers
clone protected def clone Object AnyRef
enumToList def enumToList[T](enum : Enumeration[T])
Convert a java [details]
util.Enumeration to a List[T]
List[T] ListHelpers
enumToStringList def enumToStringList[C](enum : Enumeration[C])
Convert a java [details]
util.Enumeration to a List[String] using the toString method on each element
List[String] ListHelpers
eq final def eq(arg0 : Object) Boolean AnyRef
equals def equals(arg0 : Any) Boolean AnyRef
escChar def escChar(in : Char)
Create the unicode value of a character [details]
param
in - character
return
- the unicode value as a string starting by \\u
String StringHelpers
finalize protected def finalize Unit AnyRef
first def first[B, C](in : Seq[B])(_f : (B) => Box[C])
Returns the first application of f to an element of in that results in a Full can [details]
If f applied to an element of in results in an Empty can, then f will be applied to the rest of the elements of in until a Full can results. If the list runs out then an Empty can is returned.
param
f - a function that can be applied to elements of in
in - a list of elements to which f can be applied
return
- a Box containing the first Full can or Empty if f never returns a Full can
Box[C] ListHelpers
first_? def first_?[B](in : Seq[B])(f : => (B) => Boolean)
Returns a Full can with the first element x of the list in for which f(x) evaluates to true [details]
If f(x) evaluates to false for every x, then an Empty can is returned.
param
f - a function that can be applied to elements of in
in - a list of elements to which f can be applied
return
- a Box containing the found element (or Empty if not found)
Box[B] ListHelpers
getClass final def getClass Class[Any] AnyRef
hashCode def hashCode Int AnyRef
head def head[T](l : Seq[T], deft : => T)
Return the first element of a List or a default value if the list is empty
T ListHelpers
isInstanceOf final def isInstanceOf[T0] Boolean Any
listIf def listIf[T](expr : Boolean)(f : => T)
Return a list containing the element f if the expression is true
List[T] ListHelpers
listToListMapish implicit def listToListMapish(in : Seq[(String, String)])
adds the ciGet method to a List of Pairs of Strings
ListMapish ListHelpers
ne final def ne(arg0 : Object) Boolean AnyRef
nodeSeqToOptionString implicit def nodeSeqToOptionString(in : NodeSeq)
[details]
return
- an Empty can if the node seq is empty and a full can with the NodeSeq text otherwise
Box[String] StringHelpers
notify final def notify Unit AnyRef
notifyAll final def notifyAll Unit AnyRef
parseNumber def parseNumber(tin : String)
Parse a string and return the Long value of that string [details]

The string can start with '-' if it is a negative number or '+' for a positive number

return
- an Empty can if the node seq is empty and a full can with the NodeSeq text otherwise
Long StringHelpers
permuteList def permuteList[T](in : Seq[T])
Given a list, return all the permutations of the list [details]
param
in - -- the list
return
- all the permutations of the list
List[List[T]] ListHelpers
permuteWithSublists def permuteWithSublists[T](in : Seq[T])
Given a list, return all the permutations including the removal of items (does not return a Nil list unless in is Nil) [details]
param
in - the list to permute
return
- all the permutations of the list including sublists, sorted in longest to shortest
List[List[T]] ListHelpers
processString def processString(msg : String, subst : Map[String, String])
Replaces the value found in a string surrounded by <%= [details]
.. %> by a replacement according to the value found in the subst Map.

Throws an exception if no correspondance can be found.

param
subst - map of [regular expression with groups, replacement]
msg - string where replacements should be done
String StringHelpers
randomString def randomString(size : Int)
Create a random string of a given size [details]
param
size - size of the string to create. Must be a positive or nul integer
return
- the generated string
String StringHelpers
rotateList def rotateList[T](in : Seq[T])
Given an incoming list, return a set of lists that is the original list rotated through all its positions [details]
param
in - the list to rotate
return
- all the rotations of the list
List[List[T]] ListHelpers
splitColonPair def splitColonPair(in : String, first : String, second : String)
Split a string separated by a point or by a column in 2 parts [details]
Uses default values if only one is found or if no parts are found
param
first - default value for the first part if no split can be done
second - default value for the second part if one or less parts can be found
in - string to split
return
- a pair containing the first and second parts
(String, String) StringHelpers
splitNameValuePairs def splitNameValuePairs(props : String)
Splits a string of the form <name1=value1, name2=value2, [details]
.. > and unquotes the quoted values. The result is a Map[String, String]
Map[String, String] StringHelpers
stringToSuper implicit def stringToSuper(in : String)
[details]
return
- a SuperString with more available methods such as roboSplit or commafy
SuperString StringHelpers
synchronized final def synchronized[T0](arg0 : T0) T0 AnyRef
toString def toString String AnyRef
toSuperList implicit def toSuperList[T](in : List[T])
Add utility methods to Lists
SuperList[T] ListHelpers
unquote def unquote(str : String)
If str is surrounded by quotes it return the content between the quotes
String StringHelpers
wait final def wait Unit AnyRef
wait final def wait(arg0 : Long) Unit AnyRef
wait final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
Copyright (c) 2007-2009 Lift Team. All Rights Reserved.