new String()
- Description:
Represents
baja:Stringin BajaScript.All JavaScript
Strings are augmented to bebaja:Stringobjects.
- Source:
Extends
Members
(static) DEFAULT :String
- Description:
Default
Stringinstance.
- Source:
Default String instance.
Type:
Methods
capitalizeFirstLetter() → {String}
- Description:
Returns a new
Stringwith the first letter Capitalized.
- Source:
Returns:
- Type
- String
decodeFromString(str) → {String}
- Description:
Decode a
String.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
str |
String |
Returns:
- Type
- String
encodeToString() → {String}
- Description:
Encode a
String.
- Source:
Returns:
- Type
- String
equals(obj) → {Boolean}
- Description:
Equality test.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
Returns:
- Type
- Boolean
equivalent(obj) → {Boolean}
- Description:
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.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
Returns:
- Type
- Boolean
getDataTypeSymbol() → {String}
- Description:
Return the Symbol used for encoding this data type (primarily used for facets).
- Source:
Returns:
- Type
- String
getIcon() → {baja.Icon}
- Description:
Return the Object's Icon.
- Source:
Returns:
- Type
- baja.Icon
make(stropt) → {String}
- Description:
Make a
String.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
str |
String |
<optional> |
Returns:
- Type
- String
newCopy() → {String}
- Description:
New Copy.
- Source:
Returns:
- Type
- String
patternReplace() → {String}
- Description:
Replace patterned items in a string from an Object Map.
- Source:
Example
var str = "The weather is {state}!";
str = str.patternReplace({state: "really warm"});
Returns:
- Type
- String
(static) make(stropt) → {String}
- Description:
Make a
String.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
str |
String |
<optional> |
Returns:
- Type
- String