String

String

new String()

Description:
  • Represents baja:String in BajaScript.

    All JavaScript Strings are augmented to be baja:String objects.

Source:

Extends

Members

(static) DEFAULT :String

Description:
  • Default String instance.

Source:

Default String instance.

Type:

Methods

capitalizeFirstLetter() → {String}

Description:
  • Returns a new String with 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

getAgents(isopt, batchopt) → {Promise}

Description:
  • Returns a promise that resolves to the agent list for this BString.

Source:
Since:
  • Niagara 4.15
See:
Parameters:
Name Type Attributes Description
is Array.<String> <optional>

An optional array of filters to add to the
agent query.

batch baja.comm.Batch <optional>

An optional object used to batch network
calls together.

Returns:

A promise that will resolve with the Agent Info.

Type
Promise

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