About 449,000 results
Open links in new tab
  1. How to get the size (length) of a string in Python

    1 Do you want to find the length of the string in the Python language? If you want to find the length of the word, you can use the len function.

  2. How do you get the length of a string using jQuery?

    Jun 25, 2009 · In some cases String.length might return a value which is different from the actual number of characters visible on the screen (e.g. some emojis are encoded by 2 UTF-16 units): MDN …

  3. Find the size of a string pointed by a pointer - Stack Overflow

    Nov 25, 2012 · The strlen() function provided by string.h gives you how many "real characters" the string pointed by the argument contains. However, this length does not include the terminating null …

  4. variables - Length of string in bash - Stack Overflow

    Jun 28, 2013 · How do you get the length of a string stored in a variable and assign that to another variable? myvar="some string" echo ${#myvar} # 11 How do you set another variable to the output 11?

  5. How to calculate the length of a string in C efficiently?

    The standard C library uses it The compiler uses it for literal string constants The first of these is academic in this instance since you are not using the standard library, the second is easily overcome …

  6. Find length of string in C (without using strlen) - Stack Overflow

    Jan 12, 2012 · It would be good if find_length() return the length of the string (size_t or it could also be int) instead of void OTOH, you can look at the various other implementation of strlen().

  7. querying WHERE condition to character length? - Stack Overflow

    The LENGTH () (MySQL) or LEN () (MSSQL) function will return the length of a string in a column that you can use as a condition in your WHERE clause. Edit I know this is really old but thought I'd …

  8. arrays - length and length () in Java - Stack Overflow

    Dec 27, 2009 · Why do we have the length of an array as an attribute, array.length, and for String we have a method, str.length()? Is there some reason?

  9. How to correctly compute the length of a String in Java?

    The normal model of Java string length String.length() is specified as returning the number of char values ("code units") in the String. That is the most generally useful definition of the length of a Java …

  10. How to get the number of characters in a std::string?

    May 25, 2009 · For an std::string, it's the same thing (unless you're storing a variable length encoding, or using an std::string to store multi-byte characters). If you're doing that, you're not going to get much …