Questions tagged as 'string'

1
answer

Aligning a string in a space of 42 characters

I am generating a text file and have to align the company name to the center, but the company name will vary for each client, the default amount of characters is 42. texto="lb_NomeEmpresa.text"; This way you are aligning the left by simply...
asked by 25.11.2014 / 14:19
1
answer

Validation of the strings size

I was creating a function to validate large text fields (description, observation, ...), which in SQL will be saved as TEXT , so basically I did this: function($valor, $min = 0, $max = 65000) { if (strlen($valor) >= $min || strlen...
asked by 28.09.2018 / 15:37
2
answers

Concatenate Strings in C

Good afternoon, guys! I have a problem with Strings using the C language. The problem asks the user to enter a name, then type a special character, and lastly how many times he wants the character to be concatenated with the String. Howeve...
asked by 08.09.2018 / 14:00
1
answer

Performance ItextSharp

I am doing the reports using iTextsharp and the result has been acceptable, however when working with many records it has become slow. Currently I do this: I get the bank data (storing in DataTable ); In a foreach concatenate...
asked by 16.12.2017 / 14:32
2
answers

Go through a list of characters

I have a method that checks the amount of characters in a string , and separates them into variables with the information as it can be seen in this example . The problem is when you have a list of data in string . This data will always...
asked by 13.03.2015 / 18:15
1
answer

Is it possible to omit the numbers of the formatting arguments of "String.Format" in C #?

I was seeing that in Python it is possible to format an unnumbered string the arguments . Example: #mensagem = "Meu nome é {0} e minha idade é {1}"; mensagem = "Meu nome é {} e minha idade é {}".format("Wallace", 27) print(mensagem);...
asked by 06.12.2017 / 15:29
1
answer

Delete equal values within a dynamic array

I have an array with several dynamic names that can change every moment, what is the most correct way to go through this array and create a condition to exclude them from iguail? (in this case two elements with the same name) I have seen some...
asked by 03.10.2017 / 13:31
2
answers

How to write to a text file concatenating with existing text in Java?

I would like to write to a text file using Java, but whenever I am going to use the write BufferedWriter functions the previous text is deleted and the new text is written, I would like to keep the old text and just concatenate the new...
asked by 05.02.2014 / 14:58
1
answer

Why is not working when comparing the replace of a string?

I tried to do in CLI Python 2.7.6 the following command: 'foo bar'.replace(" ", "") is 'foobar' But returned False Although 'foo bar'.replace(" ", "") return 'foobar' Does anyone have any logical explanation for t...
asked by 10.10.2016 / 05:41
1
answer

Text Cleanup and Standardization

I have an Excel table already in the R with two columns (code and company name) and 22,000 rows. The names have been filled out freely, so the same name is written in different forms, abbreviated and in full. I've been able to turn everything...
asked by 16.08.2016 / 20:48