Questions tagged as 'string'

2
answers

Print special characters on windows console

How to print special characters like 'is' and 'ç' in windows console (printf)?     
asked by 08.06.2014 / 21:34
1
answer

How to remove non-alphanumeric characters without losing accent?

I'm able to remove the non-alphanumeric as follows preg_replace('/[^a-z0-9\s]/i', null, $string ); But in this way I'm losing the accentuation of words, does anyone have an answer?     
asked by 02.11.2014 / 00:55
1
answer

Remove part of the string

I need to modify a string with jQuery. Suppose I have a variable address: var endereço = "Rua emanuel meira martins 85 cic curitiba..."; The idea is to remove all letters after position 15 and add three dots (...). How can I perform th...
asked by 15.10.2014 / 19:48
1
answer

Concatenate string with int in printf

You can do this in C: int MAX = 30; printf("\n| %".MAX."s | %8s | %8s |", "Nome", "Salario", "Idade"); printf("\n| %".MAX."s | %8.2f | %8d |", pessoa[i].nome, pessoa[i].salario, pessoa[i].idade); Note the MAX between strings to de...
asked by 06.11.2014 / 00:32
1
answer

How to improve this code

Some days ago I asked for help here in the OS to parse JSON in Java and I got what I wanted, however, I had to do a "gambiarra" for not knowing a better way. It's working, but I'm sure the code can be improved. My JSON is as follows: "we...
asked by 12.12.2017 / 03:05
1
answer

c # - Error when trying to Replace a string

Good People, I have the following problem: When trying to replace of a string (of a Literal Control ), using the following code, the value of the same does not change. MyControl.Text.Replace("id=\"KP\"", "id=\"KPC\""); H...
asked by 31.08.2018 / 11:27
2
answers

Convert string array to string in VB

I need to use SPLIT on a lot of data, but I need to convert the array string to string. I'm putting String () to get the string array variable, but VS keeps telling me that one-dimensional array can not be converted to string. Can anyone h...
asked by 28.04.2016 / 18:30
2
answers

Error in program execution involving pointers

I've been doing a program in C that read string1 and erased the first occurrence of string2. In string1: "Mouse Roasted Clothes" if I put "Ra" in string2, the program erases correctly, without errors. But if I put "Ro" in string2, it gives error...
asked by 23.07.2016 / 19:00
3
answers

Java - Palindrome string inversion

I'm trying to do an exercise where I need to invert a word, phrase or number and check if it's palindrome. For words and numbers, it is already working, but for phrases it gives errors depending on what it is, for example the phrase "help me get...
asked by 09.02.2016 / 15:37
1
answer

Executing text as code in VBA

The code below calculates the formula contained in the Text (String) variable: Private Sub CalculeFormulaNoTexto() Dim Texto As String Texto = "= 90 / 3 + 7 + COS(0) + 1/7" ' A variável Texto recebe a fórmula que quero calcular ' Observe qu...
asked by 29.11.2015 / 20:19