What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-24 01:05:43
display only initials from full name reactjs
var getInitials = function (string) { var names = string.split(' '), initials = names[0].substring(0, 1).toUpperCase(); if (names.length > 1) { initials += names[names.length - 1].substring(0, 1).toUpperCase(); } re... Add solution -
Python 2022-01-22 04:00:52
python string remove whitespace and newlines
' '.join(myString.split()) Add solution -
Python 2021-11-21 03:29:22
arduino python matplotlib line
import serial # import Serial Library import numpy # Import numpy import matplotlib.pyplot as plt #import matplotlib library from drawnow import * tempF= [] pressure=[] arduinoData = serial.Serial('com11', 115200) #Creating our serial ob... Add solution -
Java 2021-11-13 20:23:17
time complexity of split java
8 The complexity will depend on the regex that you use to do the splitting. (Yes, the argument you supply to String.split(...) is a regex!) For your example, it will be O(N) where N is the number of characters in the input String. The algorithm of spli... Add solution -
Python 2021-11-13 02:00:12
reolace double space ti single space in python'
' '.join(mystring.split()) Add solution -
Javascript 2021-11-11 01:02:13
how to turn a string into an array javascript
// our string let string = 'ABCDEFG'; // splits every letter in string into an item in our array let newArray = string.split(''); console.log(newArray); // OUTPUTS: [ "A", "B", "C", "D", "E", "F&quo... Add solution
Best helpers
User 768576
+10
Viki
+5
Riptiki
+5
Suraj tiwari
+5
Bmcl
+5
Nuno
+5
AllenG
+5
Hugh Zang
+5
Marcel Souza
+5
Rosey28
+5