• Jump To … +
    _.array.builders.js.md _.array.selectors.js.md _.collections.walk.js.md _.function.arity.js.md _.function.combinators.js.md _.function.iterators.js.md _.function.predicates.js.md _.object.builders.js.md _.object.selectors.js.md _.util.existential.js.md _.util.operators.js.md _.util.strings.js.md _.util.trampolines.js.md index.md
  • _.util.strings.js.md

  • ¶

    util.strings

    Functions for working with strings.

    camelCase

    Signature: _.camelCase(string:String)

    Converts a dash-separated string to camel case. Opposite of toDash.

    _.camelCase("ancient-greece");
    // => "ancientGreece"

    explode

    Signature: _.explode(s:String)

    Explodes a string into an array of characters. Opposite of implode.

    _.explode("Plato");
    // => ["P", "l", "a", "t", "o"]

    implode

    Signature: _.implode(a:Array)

    Implodes an array of strings into a single string. Opposite of explode.

    _.implode(["H", "o", "m", "e", "r"]);
    // => "Homer"

    strContains

    Signature: _.strContains(str:String, search:String)

    Reports whether a string contains a search string.

    _.strContains("Acropolis", "polis");
    // => true

    toDash

    Signature: _.toDash(string:String)

    Converts a camel case string to a dashed string. Opposite of camelCase.

    _.toDash("thisIsSparta");
    // => "this-is-sparta"