About 52 results
Open links in new tab
  1. javascript - How do I split a string, breaking at a particular ...

    8 split() method in JavaScript is used to convert a string to an array. It takes one optional argument, as a character, on which to split. In your case (~). If splitOn is skipped, it will simply put string as it is on …

  2. How do I split a string with multiple separators in JavaScript?

    Mar 16, 2009 · How do I split a string with multiple separators in JavaScript? I'm trying to split on both commas and spaces, but AFAIK JavaScript's split () function only supports one separator.

  3. javascript - How to use split? - Stack Overflow

    Just curious, what did you search for that you didn't find any documentation? I searched on Google for both "javascript split" and "jquery split" and the first result in both cases was the location I linked to.

  4. javascript - How do I split a string into an array of characters ...

    9 The split () method in javascript accepts two parameters: a separator and a limit. The separator specifies the character to use for splitting the string. If you don't specify a separator, the entire string …

  5. javascript - Splitting Strings in JS - Stack Overflow

    The split () method splits a String object into an array of strings by separating the string into substrings, using a specified separator string to determine where to make each split.

  6. javascript - How to split a string by white space or comma? - Stack ...

    input.split(/[ ,]+/); This particular regex splits on a sequence of one or more commas or spaces, so that e.g. multiple consecutive spaces or a comma+space sequence do not produce empty elements in …

  7. javascript - Split a string straight into variables - Stack Overflow

    var array = str.split('-'); var a = array[0]; var b = array[1]; var c = array[2]; Because for the code that I’m writing at the moment such a method would be a real pain, I’m creating 20 variables from 7 different …

  8. How to split string with newline ('\n') in Node? - Stack Overflow

    @Wyck, it's useful to know that Node is the intended runtime, because the newline character in a string is often platform-dependent. In Node.js, it's very common to operate on file texts with newline …

  9. javascript - Split an array of strings using a separator - Stack Overflow

    May 12, 2013 · In JavaScript, is it possible to split each string in a multidimensional array of strings using a separator? I'm trying to split a multidimensional array of strings using a string separator, but I don't …

  10. javascript - How can I split a string into segments of n characters ...

    20 Building on the previous answers to this question; the following function will split a string (str) n-number (size) of characters.