Questions tagged as 'string'

3
answers

What is the purpose of String.raw in Javascript?

Well, the question is the same. I would like to know what the String.raw method in Javascript is for. I saw something in the MDN documentation, but I did not quite understand the use Is it related to string templates ?     
asked by 22.06.2018 / 21:33
3
answers

What is. = in php?

What is .= in PHP? I'm not sure if it's a concatenation or multiplication.     
asked by 17.11.2016 / 14:49
3
answers

Withdraw currency formatting and get only the number in PHP

I store the values of the products in the database as follows: For example: R$ 5.000,00 How do I do in PHP to make this number stay 5000? In other words, "deformat"? Do you have any function that works for any number? Something like t...
asked by 09.08.2015 / 04:39
3
answers

Regex to select specific section

I need to identify the name, CPF and address information within contracts. The landlord's line is as follows:    LANDLORD: Jose Reinaldo Lellis de Andrade       LOCATOR: Isabel Cristina de Rezende Leme Ferreira Andrade I can select th...
asked by 20.05.2014 / 00:28
4
answers

Identifying snippets in two PHP strings

I need to make a non-standard string comparison in PHP. I have 2 strings as below: $primeira = 'asdasdasdTESTEasdasdasdasd'; $segunda = 'lkijlikjTESTEilkjik'; How do I dynamically know if the first and second variables contain the same seq...
asked by 25.09.2014 / 20:39
2
answers

How to multiply an "X" character as many times as you want?

Is there a method that multiplies an "X" character as many times as I want? example: I have the "P" character    P x 5="PPPPP" Is there a ready method in .Net?     
asked by 26.02.2016 / 15:42
3
answers

Format city names and ignore words such as "do", "of", "of", "of", "etc

I'm working with Webservice whose city names are all deformatted, and I'd like to create a function to treat the names evenly. An example is this: PORTO DE GALINHAS I would like it to look like this: Porto de Galinhas I would hav...
asked by 27.12.2015 / 22:02
4
answers

How to replace {vars} in a string?

I have a string string str = "Bem vindo {Usuario}. Agora são: {Horas}"; I want to replace {Usuario} with a name and {Horas} with the current time, how can I do this?     
asked by 19.12.2013 / 03:16
3
answers

String contains a certain word

I would like to check if a string contains a certain word. String = "oi\ntchau\nhi\nbye" The string is divided by \n (skip line), I would like to check between each line, if it contains the entire word, I already tried it and sti...
asked by 05.09.2014 / 09:17
4
answers

String Concatenation in SQL

I make a query in a table in my MySQL database that returns the following fields: usuarioId nome sobrenome idade sexo escolaridade modeloNome hora Follow the sql below: SELECT sv...
asked by 15.01.2014 / 16:13