I have common information such as people's names and addresses, and I need them to contain a maximum of 30 characters without cutting words.
Example:
'Avenida Natalino João Brescansin' => 'Av. Natalino J. Brescansin'
'Joaquim Rossafa Nas...
Imagine I have the following string:
string texto = "Stackoverflow em Português";
If I want to know the index of the first space, just:
int index = texto.IndexOf(" ");
But in this case I have two spaces, and I would like to get the ind...
How to convert the letters of the alphabet into an array of numbers according to its sequence?
The array should start from # 1, not zero. So the letter A would be 1 , B would be 2 , C would be 3 , an...
I want to iterate a string with foreach . For this, I learned that I should use the str_split function, which separates each character from the string into a
array . But this operation does not work as expected when using str...
I have the following function:
if (str.match(/\d\d\d\d\d\.\d\d\d\d\d/)) {
var codigo_velho = str.match(/\d\d\d\d\d\.\d\d\d\d\d\/);
result = "1"; }
How do I change this function so that it detects line break in match ? For ex...
I've created a list:
usuarios = ['123\n','123\n4']
I tried to convert index 0 to integer using int()
int(usuarios[0])
Result:
123
But when I tried to do the same with index 1:
int(usuarios[1])
result:
ValueError:...
Why in Javascript is it possible to call String as a function and also instantiating?
See the example:
var str1 = new String(1)
var str2 = String(1)
console.log("Valor é %s e o tipo é %s", str1, typeof(str1));
console.log("V...
For the problem in question, I need to remove all special characters and spaces and count the possible new outputs. My intention is to separate the String with the split() method. For this, based on another expression I saw, I created thi...
In this code I read two strings and remove all first letters in common with the second string . But how do you put a null character in place of this letter in common in the two strings ?
My code looks like this:
char str1[15], str2[15];...