A helpful Boolean extractor
A helpful Double extractor
A helpful Int extractor
A helpful Long extractor
This operator transforms its arguments into a List
This operator transforms its arguments into a List
the list of arguments passed as varargs
A helper that will convert the String to a Boolean if it's t, true, yes, 1, f, false, no, or 0
A helper that will convert the String to a Boolean if it's t, true, yes, 1, f, false, no, or 0
Safely convert the specified String to a Double.
Safely convert the specified String to a Double.
Safely convert the specified String to an Int.
Safely convert the specified String to an Int.
Convert any object to an "equivalent" Long depending on its value
Convert any object to an "equivalent" Long depending on its value
Safely convert the specified String to a Long.
Safely convert the specified String to a Long.
Test for null and return either the given String if not null or the blank String.
Test for null and return either the given String if not null or the blank String.
Allows an implicit transform from a Boolean to a Boolean2, allowing expressions such as:
(1 == 2) ? "a" | "b"
(This expression will return "b")
Allows an implicit transform from a Boolean to a Boolean2, allowing expressions such as:
(1 == 2) ? "a" | "b"
(This expression will return "b")
the predicate to be tested by the ternary operator.
true if the method is public and has no parameters
Turns a string of format "foo_bar" into camel case "FooBar"
Turns a string of format "foo_bar" into camel case "FooBar"
Functional code courtesy of Jamie Webb (j@jmawebb.cjb.net) 2006/11/28
the String to CamelCase
the CamelCased string
Turn a string of format "foo_bar" into camel case with the first letter in lower case: "fooBar" This function is especially used to camelCase method names.
Turn a string of format "foo_bar" into camel case with the first letter in lower case: "fooBar" This function is especially used to camelCase method names.
the String to CamelCase
the CamelCased string
Capitalize every "word" in the string.
Capitalize every "word" in the string. A word is either separated by spaces or underscores.
string to capify
the capified string
Faster than roboSplit.
Faster than roboSplit... this method splits Strings at a given character
Check that the method 'name' is callable for class 'clz'
Check that the method 'name' is callable for class 'clz'
the class supposed to own the method
name of the method to test
true if the method exists on the class and is callable
Remove all the characters from a string exception a-z, A-Z, 0-9, and '_'
Remove all the characters from a string exception a-z, A-Z, 0-9, and '_'
the cleaned string and an empty string if the input is null
Add commas before the last 3 characters
Add commas before the last 3 characters
the string with commas
Compare two Elems
Compare two Elems
Compare the metadata of two attributes
Compare the metadata of two attributes
Comparse two XML nodes
Comparse two XML nodes
Compare two NodeSeq and return true if they are equal, even if attribute order of Elems is different
Compare two NodeSeq and return true if they are equal, even if attribute order of Elems is different
Is the clz an instance of (assignable from) any of the classes in the list
Is the clz an instance of (assignable from) any of the classes in the list
the class to test
the list of classes to match against
true if clz is assignable from any of the matching classes
Create a function (the 'invoker') which will trigger any public, parameterless method That function will throw the cause exception if the method can't be invoked
Create a function (the 'invoker') which will trigger any public, parameterless method That function will throw the cause exception if the method can't be invoked
instance whose method must be invoked
Empty if instance is null or Full(invoker)
Turn a String into a Box[String], with Empty for the blank string.
Turn a String into a Box[String], with Empty for the blank string.
A string containing only spaces is considered blank.
Full(s.trim) if s is not null or blank, Empty otherwise
Encode the string to be including in JavaScript, replacing '\' or '\\' or non-ASCII characters by their unicode value
Encode the string to be including in JavaScript, replacing '\' or '\\' or non-ASCII characters by their unicode value
the encoded string inserted into quotes
Create the unicode value of a character
Create the unicode value of a character
character
the unicode value as a string starting by \\u
Find a class given a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary
Find a class given a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary
a Box, either containing the found class or an Empty can.
Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.
Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.
a Box, either containing the found class or an Empty can.
Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.
Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.
a Box, either containing the found class or an Empty can.
General method to in find a class according to its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.
General method to in find a class according to its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').
a Box, either containing the found class or an Empty can.
General method to in find a class according to its name, a list of possible packages, a list of functions modifying the given name create a target name to look for (e.
General method to in find a class according to its name, a list of possible packages, a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').
a Box, either containing the found class or an Empty can.
Find a class given its type, a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary
Find a class given its type, a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary
a Box, either containing the found class or an Empty can.
Find a class given its type, its name and a list of packages, turning underscored names to CamelCase if necessary.
Find a class given its type, its name and a list of packages, turning underscored names to CamelCase if necessary.
a Box, either containing the found class or an Empty can.
General method to in find a class according to its type, its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.
General method to in find a class according to its type, its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').
a Box, either containing the found class or an Empty can.
Create a new instance of a class
Create a new instance of a class
a Full can with the instance or a Failure if the instance can't be created
Invoke a controller method (parameterless, public) on a class
Invoke a controller method (parameterless, public) on a class
the class owning the method
the result of the method invocation or throws the root exception causing an error
Invoke the given method for the given class, with some parameters and their types Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used
Invoke the given method for the given class, with some parameters and their types Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used
class whose method should be invoked
instance of the class who method should be invoked, if the method is not static
method to invoke
parameters to pass to the method
list of types of the parameters
a Box containing the value returned by the method
Invoke the given method for the given class, with some parameters.
Invoke the given method for the given class, with some parameters. Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used
class whose method should be invoked
instance of the class who method should be invoked, if the method is not static
method to invoke
parameters to pass to the method
a Box containing the value returned by the method
Invoke the given method for the given class, with no params.
Invoke the given method for the given class, with no params. The class is not instanciated if the method is static, otherwise the passed instance is used
class whose method should be invoked
instance of the class who method should be invoked, if the method is not static
method to invoke
a Box containing the value returned by the method
Compare two arrays of Byte for byte equality.
Compare two arrays of Byte for byte equality.
true if two Byte arrays contain the same bytes
Creates a List of Strings from a List[String] and a String
Creates a List of Strings from a List[String] and a String
Creates a List of Strings from two Strings
Creates a List of Strings from two Strings
a SuperString with more available methods such as roboSplit or commafy
an Empty can if the node seq is empty and a full can with the NodeSeq text otherwise
Compare two arrays of Byte for byte equality.
Compare two arrays of Byte for byte equality.
true if two Byte arrays don't contain the same bytes
Parse a string and return the Long value of that string.
Parse a string and return the Long value of that string.
The string can start with '-' if it is a negative number or '+' for a positive number
the Long value of the input String
promote a partial function such that we can invoke the guard method to wrap the guarded partial function with a guard
promote a partial function such that we can invoke the guard method to wrap the guarded partial function with a guard
Replaces the value found in a string surrounded by <%= .
Replaces the value found in a string surrounded by <%= ... %> by a replacement according to the value found in the subst Map.
Throws an exception if no correspondance can be found.
string where replacements should be done
map of [regular expression with groups, replacement]
Create a random string of a given size.
Create a random string of a given size. 5 bits of randomness per character
size of the string to create. Must be a positive integer.
the generated string
Split a string according to a separator
Split a string according to a separator
a regexp to use with the String::split method
a list of trimmed parts whose length is > 0
Turn a string of format "FooBar" into snake case "foo_bar"
Turn a string of format "FooBar" into snake case "foo_bar"
Note: snakify is not reversible, ie. in general the following will _not_ be true:
s == camelify(snakify(s))
the underscored string
Split a string in 2 parts at the first place where a separator is found
Split a string in 2 parts at the first place where a separator is found
a List containing a pair of the 2 trimmed parts
Split a string separated by a point or by a column in 2 parts.
Split a string separated by a point or by a column in 2 parts. Uses default values if only one is found or if no parts are found
string to split
default value for the first part if no split can be done
default value for the second part if one or less parts can be found
a pair containing the first and second parts
Splits a string of the form <name1=value1, name2=value2, .
Splits a string of the form <name1=value1, name2=value2, ... > and unquotes the quoted values. The result is a Map[String, String]
a SuperString with more available methods such as roboSplit or commafy
Convert any object to an "equivalent" Boolean depending on its value
Convert any object to an "equivalent" Boolean depending on its value
Convert any InputStream to a ByteArrayInputStream
Convert any InputStream to a ByteArrayInputStream
Convert any object to an "equivalent" Int depending on its value
Convert any object to an "equivalent" Int depending on its value
Convert any object to an "equivalent" Long depending on its value
Convert any object to an "equivalent" Long depending on its value
Implicit transformation from a Boolean expression to an OptionalCons object so that an element can be added to a list if the expression is true
Implicit transformation from a Boolean expression to an OptionalCons object so that an element can be added to a list if the expression is true
Wraps a "try" block around the function f.
Wraps a "try" block around the function f. Takes only one Class of exception to ignore
- a single exception classes to ignore. A thrown exception will be ignored if it is assignable from this class.
- the block of code to evaluate
Wraps a "try" block around the function f
Wraps a "try" block around the function f
- a list of exception classes to ignore. A thrown exception will be ignored if it is assignable from one of the exception classes in the list
- the block of code to evaluate
Wraps a "try" block around the function f and trigger a callback function if an exception is thrown
Wraps a "try" block around the function f and trigger a callback function if an exception is thrown
- an optional callback function that will use the thrown exception as a parameter
- the block of code to evaluate
Wraps a "try" block around the function f
Wraps a "try" block around the function f
- the block of code to evaluate
Wraps a "try" block around the function f.
Wraps a "try" block around the function f. If f throws an exception that is in the domain of the handler PF, the handler will be invoked on the exception. Otherwise the exception is wrapped into a Failure.
- A partial function that handles exceptions
- the block of code to evaluate
net.liftweb.common.Failure
Wraps a "try" block around the function f.
Wraps a "try" block around the function f. If f throws an exception with its class in the 'ignore' list or if 'ignore' is null or an empty list, ignore the exception and return None.
- a list of exception classes to ignore. A thrown exception will be ignored if it is assignable from one of the exception classes in the list
- an optional callback function that will use the thrown exception as a parameter
- the block of code to evaluate
If str is surrounded by quotes it return the content between the quotes
If str is surrounded by quotes it return the content between the quotes
(Since version 2.3) Use StringHelpers.camelify
(Since version 2.3) Use StringHelpers.camelifyMethod
(Since version 2.3) Use blankForNull instead
(Since version 2.3) Use StringHelpers.snakify
This object adds functionality to Scala standard types.