# External: String

## montage/core/shim/string~ String

Source:
  - core/shim/string.js, line 7

### Methods

#### contains(content) → {boolean}

Determines whether a substring exists within this string.

##### Parameters:

Name | Type | Description
--- | --- | ---
`content` | string |

Source:
  - core/extras/string.js, line 26

##### Returns:

whether this string contains the given content

Type
  boolean

#### endsWith(substring) → {boolean}

Returns whether this string ends with a given substring.

##### Parameters:

Name | Type | Description
--- | --- | ---
`substring` | string | a potential substring of this string

Source:
  - core/shim/string.js, line 29

##### Returns:

whether this string ends with the given substring

Type
  boolean

#### equals(that) → {boolean}

Returns true if the two strings are equal, otherwise returns false.

##### Parameters:

Name | Type | Description
--- | --- | ---
`that` | Object | The object to compare to the string.

Source:
  - core/extras/string.js, line 10

##### Returns:

Returns true if the string is equal to `that`.

Type
  boolean

#### startsWith(substring) → {boolean}

Returns whether this string begins with a given substring.

##### Parameters:

Name | Type | Description
--- | --- | ---
`substring` | string | a potential substring of this string

Source:
  - core/shim/string.js, line 11

##### Returns:

whether this string starts with the given substring

Type
  boolean

#### toCapitalized() → {string}

Capitalizes the first letter in the string.

Source:
  - core/extras/string.js, line 41

##### Returns:

The original string with its first letter capitalized.

Type
  string

##### Example

    var fname = "abe";
    var lname = "lincoln";
    var name = fname.toCapitalized() + " " + lname.toCapitalized();
    // name == "Abe Lincoln"