Questions tagged as 'string'

4
answers

What does the "@" sign in C # mean?

I have the following string @"\servidor01\arquivos" . What is the function of @ in front of string ?     
asked by 20.11.2014 / 12:56
4
answers

What is the correct way to do a regular replacement in JavaScript for all occurrences found?

What is the correct way to do a regular replacement in JavaScript for all occurrences found? The way I currently do: var i = 0; while ((i = str.indexOf("_", i)) != -1) { str = str.replace("_", " "); } Or until: str = str.split("_")...
asked by 12.12.2013 / 12:20
4
answers

What is the most appropriate way to concatenate strings?

There are different methods for concatenating strings, such as Concatenating with the "abc" + str Formatting String.Format("abc{0}", str); Using StringBuilder new StringBuilder("abc").Append(str); Using the Concat...
asked by 11.12.2013 / 21:42
1
answer

What does the "$" symbol mean before a string?

Viewing a code here in SOpt, I noticed the use of the "$" symbol and I was not sure how to use it. What is the "$" symbol before a string ? What is it for? Why use it? Example using static System.Console; public class Program {...
asked by 07.10.2015 / 14:35
7
answers

How do I remove accents in a string?

I have a string áéíóú What I want to convert to aeiou How do I remove the accents? I need to save in the database as a URL.     
asked by 11.12.2013 / 16:51
2
answers

How to remove accents and other graphic signals from a String in Java?

How to remove accents and other graphic signals from a String in Java? Ex .: String s = "maçã"; String semAcento = ???; // resultado: "maca"     
asked by 11.12.2013 / 17:36
4
answers

How to compare Strings in Java?

The == operator says that the Strings are different, and they store the same literal value, see example: public class TesteString { public static void main(String[] args) { String str1 = "teste"; String str2 = "Otes...
asked by 03.02.2014 / 16:19
6
answers

How to read a text file in Java?

I have the file named dados.txt and I want to put it in String . For example: String texto = lerArquivo("conteudo.txt"); Question How to write this method lerArquivo() ?     
asked by 10.01.2014 / 02:55
5
answers

What is the difference between string vs string?

I'd like to know what the actual difference is between String (upper case s) and string (lowercase s). Apparently the two have the same goals, but which one is "better" to use?     
asked by 01.02.2014 / 11:31
1
answer

What is Null Byte Injection? How to avoid it?

What would this Null Byte Injection be? How to avoid it?
asked by 14.08.2015 / 14:23