Built-In Class String
Represents baja:String in BajaScript.
All JavaScript Strings are augmented to be baja:String objects.
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
String.DEFAULT
Default String instance.
|
| Method Attributes | Method Name and Description |
|---|---|
|
Returns a new String with the first letter Capitalized.
|
|
|
decodeFromString(str)
Decode a String.
|
|
|
Encode a String.
|
|
|
equals(obj)
Equality test.
|
|
|
equivalent(obj)
Equivalence test.
|
|
|
Return the Symbol used for encoding this data type (primarily used for facets).
|
|
|
getIcon()
Return the Object's Icon.
|
|
| <static> |
String.make(str)
Make a String.
|
|
make(str)
Make a String.
|
|
|
newCopy()
New Copy.
|
|
|
patternReplace(obj)
Replace patterned items in a string from an Object Map.
|
Field Detail
<static>
String.DEFAULT
Default String instance.
Method Detail
{String}
capitalizeFirstLetter()
Returns a new String with the first letter Capitalized.
- Returns:
- {String}
{String}
decodeFromString(str)
Decode a String.
- Parameters:
- {String} str
- Returns:
- {String}
{String}
encodeToString()
Encode a String.
- Returns:
- {String}
{Boolean}
equals(obj)
Equality test.
- Parameters:
- obj
- Returns:
- {Boolean}
{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 equals().
- Parameters:
- obj
- Returns:
- {Boolean}
{String}
getDataTypeSymbol()
Return the Symbol used for encoding this data type (primarily used for facets).
- Returns:
- {String}
{baja.Icon}
getIcon()
Return the Object's Icon.
- Returns:
- {baja.Icon}
<static>
{String}
String.make(str)
Make a String.
- Parameters:
- {String} str Optional
- Returns:
- {String}
{String}
make(str)
Make a String.
- Parameters:
- {String} str Optional
- Returns:
- {String}
{String}
newCopy()
New Copy.
- Returns:
- {String}
{String}
patternReplace(obj)
Replace patterned items in a string from an Object Map.
// For example...
var str = "The weather is {state}!";
str = str.patternReplace({state: "really warm"});
- Parameters:
- obj
- Returns:
- {String}