About 46,800 results
Open links in new tab
  1. How do I make the first letter of a string uppercase in JavaScript ...

    Jun 22, 2009 · If you use Underscore.js or Lodash, the underscore.string library provides string extensions, including capitalize: _.capitalize (string) Converts first letter of the string to …

  2. How can I test if a letter in a string is uppercase or lowercase using ...

    Jun 22, 2009 · Here is a function that uses a regular expression to test against the letters of a string; it returns true if the letter is uppercase (A-Z). We then reduce the true/false array to a …

  3. How can I capitalize the first letter of each word in a string using ...

    The function below does not change any other part of the string than trying to convert all the first letters of all words (i.e. by the regex definition \w+) to uppercase.

  4. javascript - Capitalize words in string - Stack Overflow

    The regex basically matches the first letter of each word within the given string and transforms only that letter to uppercase: \b matches a word boundary (the beginning or ending of word);

  5. javascript - How to convert a string to Pascal case? - Stack Overflow

    I'd like to know how I can convert a string into Pascal case (aka upper camel case) in JavaScript. Conversion Examples: double-barrel = DoubleBarrel DOUBLE-BARREL = DoubleBarrel …

  6. How could I detect if there is an uppercase character in a string

    Jun 10, 2022 · But I'm curious how I can take a string, and search to see if any characters are uppercase, and if so, return true or return a string with the characters that are uppercase. Any …

  7. Javascript Split string on UpperCase Characters

    Oct 25, 2011 · Javascript Split string on UpperCase Characters Asked 13 years, 11 months ago Modified 1 year, 2 months ago Viewed 138k times

  8. javascript - Change Input to Upper Case - Stack Overflow

    Set the style text-transform: uppercase on the textbox so that it appears uppercase to the user, then in your Javascript apply the text transformation once whenever the user's caret focus …

  9. javascript - Uppercase first letter of variable - Stack Overflow

    Jan 29, 2017 · I imagine you could use substring () and toUpperCase () to pull out the first character, uppercase it, and then replace the first character of your string with the result.

  10. javascript - Insert space before capital letters - Stack Overflow

    Apr 7, 2011 · I have a string "MySites". I want to place a space between My and Sites. How can I do this in jQuery or JavaScript?