About 50 results
Open links in new tab
  1. javascript - How do you get the length of a string using jQuery ...

    Jun 25, 2009 · UTF-16, the string format used by JavaScript, uses a single 16-bit code unit to represent the most common characters, but needs to use two code units for less commonly-used characters, …

  2. How to check string length with JavaScript - Stack Overflow

    Jun 15, 2012 · I want to get the string length when a key is pressed like StackOverflow does. I have tried to do this with onblur, but it's not working. How do I do this?

  3. How to check string length in JavaScript? - Stack Overflow

    Oct 22, 2015 · How can I check the length of in String in JavaScript? Here is a small code example:

  4. How does String.length work in JavaScript? - Stack Overflow

    I want to know how is the string length of a string calculated in js. Is is a function call or a class data member. I want to know what happens when we execute the following code : a = 'this is a ...

  5. javascript - Generate a string of random characters - Stack Overflow

    I want a string of fixed length, composed of characters picked randomly from a set of characters e.g. [a-zA-Z0-9]. How can I do this with JavaScript?

  6. Isn't string.length actually a method in JavaScript?

    Jul 16, 2021 · It's easy to think of strings in Javascript as mutable and as such length should be a method, but when you do var a = 'hello'; a += ' hello'; it looks like you can mutate a string, but what's …

  7. How to get length of string in javascript without using native length ...

    Feb 18, 2017 · I am working on a practice problem: Return the length of a string without using javascript's native string.length method. The only ways I could think of would be substring or slice, …

  8. How to display string length in javascript - Stack Overflow

    Oct 19, 2017 · I am new to javascript, and today i was trying my first example as shown below in the code section. I am using an editor called "Free Javascript Editor". when I run the code, the browser …

  9. How to trim a string to N chars in Javascript? - Stack Overflow

    How can I, using Javascript, make a function that will trim string passed as argument, to a specified length, also passed as argument. For example: var string = "this is a string"; var length = 6;...

  10. unicode - String length in bytes in JavaScript - Stack Overflow

    String length in bytes in JavaScript Asked 14 years, 10 months ago Modified 1 month ago Viewed 211k times