Questions tagged as 'string'

2
answers

Using Array.Foreach to modify the collection

I want to remove spaces from the beginning and end of the string ( Trim ) in all positions of the array , but none of the forms below worked. What am I doing wrong? var optionArray = new string[] { "in the jungle ", " the mighty jungle"...
asked by 26.07.2016 / 19:34
3
answers

Line break in email message

In my string mensagem , I would like to have a space of two lines, I already tried to use "/ n" and did not get the expected result. @{ var customerName = Request["customerName"]; var customerEmail = Request["customerEmail"];...
asked by 13.11.2014 / 13:23
2
answers

Revert a string and possibility of method addition on native objects in Python

In Python, we have method reverse within List . It reverses the order of a list . Example: [1, 2, 3].reverse() // [3, 2, 1] But this method is not present in a string. example (Python): myString = "The String" myS...
asked by 13.01.2015 / 16:07
1
answer

Convert roman number to decimal

I'm doing an exercise where I need to convert a typed Roman number, and the program returns a decimal number. My algorithm: import java.util.Scanner; public class NumerosRomanos { public static void main (String args []) { Sy...
asked by 20.10.2016 / 00:43
2
answers

How to give replace RegExp in editable div using Javascript?

I have an editable% color where I can capture the whole text inside it. Dai I want that in every occurrence of a certain word that word be replaced by another. Very simple. The code I tried did not work. It itself works only that the output...
asked by 24.12.2014 / 12:35
1
answer

Error removing accents from a string for creating friendly URLs

Hello, I would like to know how I can get around the error that is being caused in the code below. When I add accents, special characters are being dropped instead of converted. I got this code with a friend for a while and nothing started to...
asked by 03.10.2015 / 18:58
2
answers

Replace values within string

How do I replace values within a string ? The string will look like this: gabriel = 1.73,derp = 1.80, Take into account that this structure is: nome = altura, nome = altura, . In case, I want to replace the height of gabriel...
asked by 12.02.2015 / 08:45
1
answer

How to print 0.10 instead of 0.1 in Java?

The code below counts how many letters you have in a word and multiplies by 0.01. The problem is that when a 10-letter word, for example, is entered, it has an output of 0.10 instead of 0.1. import java.util.Scanner; import java.text.DecimalFo...
asked by 10.07.2018 / 22:31
3
answers

Error concatenating component value in query

Queries in my C # Winforms project are being done through StringBuilder . It was suggested here in the OS that I changed the way to generate the query from Consulta.Append("Select * from...") to @"select * from..." because...
asked by 31.10.2018 / 15:15
2
answers

.txt import for MySQL - values between strings

I have a TXT file that contains several different records, in some cases I need to get the information that is between 2 strings, eg Cliente: FULANO DE TAL CPF: I need it to be between Cliente: e CPF: . In other parts of the same...
asked by 15.06.2014 / 20:47