public class String
extends java.lang.Object
Refer to JavaScript Reference.
Modifier and Type | Method and Description |
---|---|
String |
$camel()
Returns a copy of this string by converting dashes into a camel-case equivalent.
|
String |
$inc(int diff)
Returns a copy of the first character of a string by increasing its value.
|
String |
$sub(String cc)
Returns the difference between the first character of this string and
the first character of the specified string.
|
boolean |
endsWith(String postfix)
Returns whether this string ends with the specified postfix.
|
boolean |
startsWith(String prefix)
Returns whether this string starts with the specified prefix.
|
String |
trim()
Returns a copy of the string, with leading and trailing whitespace omitted.
|
public String $camel()
Example:
"foo-bar".$camel(); //returns "fooBar"
public String $inc(int diff)
For example, 'a'.$inc(2) is 'c' (same as 'a' + 2 in Java) and 'z'.$inc(-1) is 'y'.
diff
- number to increase$sub(_global_.String)
public String $sub(String cc)
For example, 'd'.$sub('c') is 1 (same as 'd' - 'c' in Java)
cc
- a string to compare with$inc(int)
public boolean startsWith(String prefix)
prefix
- the prefix to testendsWith(_global_.String)
public boolean endsWith(String postfix)
postfix
- the postfix to teststartsWith(_global_.String)
public String trim()
Copyright © 2005-2023 Potix Corporation. All Rights Reserved.