new String()
Represents baja:String
in BajaScript.
All JavaScript String
s are augmented to be baja:String
objects.
Extends
Members
Methods
-
<static> make( [str])
-
Make a
String
.Parameters:
Name Type Argument Description str
String <optional>
Returns:
- Type
- String
-
capitalizeFirstLetter()
-
Returns a new
String
with the first letter Capitalized.Returns:
- Type
- String
-
decodeFromString(str)
-
Decode a
String
.Parameters:
Name Type Description str
String Returns:
- Type
- String
-
encodeToString()
-
Encode a
String
.Returns:
- Type
- String
-
equals(obj)
-
Equality test.
Parameters:
Name Type Description obj
Returns:
- Type
- Boolean
-
equivalent(obj)
-
Equivalence test.
equivalent()
is used to compare if two objects have equivalent
state, but might not want to return true for equals since it
it has implied semantics for many operations. The default
implementation returns the result of baja.Object#equals.Parameters:
Name Type Description obj
Returns:
- Type
- Boolean
-
getDataTypeSymbol()
-
Return the Symbol used for encoding this data type (primarily used for facets).
Returns:
- Type
- String
-
getIcon()
-
Return the Object's Icon.
Returns:
- Type
- baja.Icon
-
make( [str])
-
Make a
String
.Parameters:
Name Type Argument Description str
String <optional>
Returns:
- Type
- String
-
newCopy()
-
New Copy.
Returns:
- Type
- String
-
patternReplace()
-
Replace patterned items in a string from an Object Map.
Returns:
- Type
- String
Example
var str = "The weather is {state}!"; str = str.patternReplace({state: "really warm"});