What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-19 16:54:06
make first letter uppercase
//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.repl... Add solution -
Java 2021-10-16 17:20:05
jdbc where like parameter
private List getTopics (Connection conn, String searchCriteria) throws SQLException { List blogs = new LinkedList(); String query = "SELECT id, text FROM blogs WHERE UPPER(text) LIKE ?"; try { // going to do a search using "uppe... Add solution -
Javascript 2021-10-13 20:28:03
js paste event
const target = document.querySelector('div.target'); target.addEventListener('paste', (event) => { let paste = (event.clipboardData || window.clipboardData).getData('text'); paste = paste.toUpperCase(); const selection = window.getSelect... Add solution -
Java 2021-10-13 00:50:03
how get most comon element in map java
public static void main(String[] args) { ArrayList<String> string; string = new ArrayList<>(Arrays.asList("Mah", "Bob", "mah", "bat", "MAh", "BOb")); Map<String, Intege... Add solution -
Javascript 2021-10-12 23:17:06
js first letter to uppercase
//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.repl... Add solution -
TypeScript 2021-10-12 06:07:06
capitalize first letter of all word typescript
//Altered, "capitalize all words of a string" (javascript by Grepper on Jul 22 2019) answer to compatible with TypeScript var myString = 'abcd abcd'; capitalizeWords(text){ return text.replace(/(?:^|\s)\S/g,(res)=>{ return res.toUpperCase... Add solution -
Javascript 2021-10-10 02:57:03
capitalize algorithm
function capitalize1(str) { const arrOfWords = str.split(" "); const arrOfWordsCased = []; for (let i = 0; i < arrOfWords.length; i++) { const word = arrOfWords[i]; arrOfWordsCased.push(word[0].toUpperCase() + word.slice(1).toL... Add solution -
Javascript 2021-10-09 13:07:06
capitalize a string javascript
//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.repl... Add solution