I need to create an object of type System.IO.Stream from the contents of a string . This my string is in a Resource.resx file. I retrieve it like this:
string xml = ResourcesRel.pt_BR;
I need to use a component that ha...
I understand that it is often best to appreciate the legibility and clarity of code by programming explicitly. This does not stop at JavaScript, but also at C # , Python and perhaps the rest of the programming languages.
I know these conv...
When I try to concatenate a String that is actually null with a valid string (eg "a"), I get the value nulla . See the example below:
String a = "a";
String b = null;
System.out.println(b + a);
I wanted the output to be just...
I'm currently developing a project that I'm using regular expressions to find certain patterns, however there is a specific String and I need to extract two numbers from this, the expression is like this:
Agência: 0000 Conta: 00000-0...
For example, I have a string with multiple occurrences of a :
a = 'abcdefhanmakaoa'
If I use the find method, I can only find the index of the first occurrence. Is there a native method / function that returns all occurrences?...
I'm trying to develop code in my game but I'm having this error.
...
case "cpsuser":
Console.Write("Digite o apelido do usuário: ");
string Nickname = Console.ReadLine();
Console.Write("Digite a quantidade de Cupons");
stri...
I'm trying to do here because the user provides 3 names at least so I have to sort those names alphabetically, I had tried with strcmp , but I did not quite understand the concept of this command. So I used the following code:
char nm1[2...
I would like to know if there is a simple way to find consecutive (equal) numbers in a string, so that you can replace that string with a single value.
For example:
string input = "Abc111de2234";
string output = "Abc1de234";
I was modifying a regex for a program in c ++ that would validate the following input form of the 29/feb/2000 dates. Currently it was only accepting 29/02/2000 or 30/03/2017 .
I tried to add to the other months but I can n...
If the vector name or array is already the address of the first element, why in scanf() , using the primitive types ( int , char , float , double ) I need to pass the address, and when we want to read a string (...