I've seen a colleague converting a string to integer using the var a = +"10" f syntax but I've always used parseInt() and the line is usually var a = parseInt("10") .
Why putting the + operator before a string happens,...
I have a file something like this:
%usuario: 'Anônimo'
Olá <b>%{usuario}</b>
(This is just an example and is not the real case), but I think if I were to explain the real problem it would give me a lot more work to understand, s...
There are two different ways to break a CR (carriage return) line and LF (line feed).)
What's the difference between these two? When should one use one or the other? Does it depend on the system? From the language?
I have a format of String , for example:
xxxx-xxxx-xxx
However, instead of x you can enter several letters or numbers, for example:
A216-0450-013
X2LP-1018-589
Y585-0000-047
What I need to do is compare to see if t...
I have the result of a query with several joins , and in a row I have the concatenation of 2 groups. The line returns a string as: 1,4|a1,b4 .
What I need is to regroup ID and Value as follows: array( 1 => a1 , 4 =>...
I'm developing a component to read the file submitted by DataPrev with the list of monthly obituaries. This file is a TXT and every 210 characters is a different person.
The documentation can be seen at this link : SISOBI .
I'm used...
I have a method that will get two strings and return the sum of them in string format.
I use string since there will be +30 digits. I'm having trouble converting to add up. :
Up to the most recent stable version, Java 8, objects of type String are immutable. That is, any change in a String causes the creation of a new object String .
Is not this harmful from a performance standpoint?
What wa...
When you run the following code:
function foo(string $text) {
echo $text;
}
foo('bar');
I get the following error:
PHP Catchable fatal error: Argument 1 passed to foo () must be an instance of string, given string, called in / hom...