जावास्क्रिप्ट भुनाने सभी शब्दों

कोड उदाहरण

119
0

जावास्क्रिप्ट कैपिटल शब्दों

//capitalize only the first letter of the string. 
function capitalizeFirstLetter(string) {
    return string.charAt(0).toUpperCase() + string.slice(1);
}
//capitalize all words of a string. 
function capitalizeWords(string) {
    return string.replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); });
};
2
0

जावास्क्रिप्ट कैपिटल

myString = 'the quick green alligator...';
myString.replace(/^\w/, (c) => c.toUpperCase());

myString = '    the quick green alligator...';
myString.trim().replace(/^\w/, (c) => c.toUpperCase());
1
0

जावास्क्रिप्ट अलग-अलग शब्दों के द्वारा पूंजी पत्र

"thisIsATrickyOne".split(/(?=[A-Z])/);
1
0

अपरकेस में शब्द जावास्क्रिप्ट

function toTitleCase(str) {
    return str.replace(/\w\S*/g, function(txt){
        return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
    });
}
-1
0

जावास्क्रिप्ट भुनाने सभी शब्दों

export function capitalize(str: string, all: boolean = false) {
  if (all)
    return str.split(' ').map(s => capitalize(s)).join(' ');
  return str.charAt(0).toUpperCase() + str.slice(1);
}

इसी तरह के पन्ने

उदाहरणों के साथ समान पृष्ठ

अन्य भाषाओं में

यह पृष्ठ अन्य भाषाओं में है

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

इस श्रेणी में लोकप्रिय

श्रेणी में उदाहरण के साथ लोकप्रिय पृष्ठों