Questions tagged as 'string'

1
answer

How to sort a List of Strings?

I have List<List<string>> and need to sort the main list according to some elements of the secondary see the illustration below. Ineedthefirstleveltobeinalphabeticalorder,andthesecondlevelisinascendingorderbutaccordingtoth...
asked by 30.01.2017 / 23:57
1
answer

Library that matches the interpolation string of C # 6.0 at runtime

Does anyone know of any library that does run-time interpolation in strings? I know it would be possible to do using Replace() , but I do not want to go through the list with all the variables. For example: Programa de classe {...
asked by 22.06.2016 / 15:25
2
answers

Variable outside the bounds of the matrix

I'm trying to put the items in positions of an array, but I get the error that the variable is outside the bounds of the array. I do not know how to fix the bug and I need help. Follow the code: Dim posicao As String = String.Join("", itens...
asked by 02.05.2016 / 00:19
2
answers

Word problem with same letters

I'm solving a problem where I get a array of strings with different words, I have to find out for each word ( string ) which are your friends. Friendly words are those that have the same letters in different or equal order. The proble...
asked by 02.08.2016 / 17:44
2
answers

Convert String with AM / PM to DateTime

I have a variable that contains a date with AM / PM: string data = "01/08/2016 9:00 PM"; When I try to convert to DateTime using the TryParse method, the result ignores the designator "AM / PM". string data = "01/08/2016 9:0...
asked by 31.08.2016 / 22:07
2
answers

determining a string inside a switch in C

I have doubts on how to define a string inside a switch in C, without having to do a table of constants for this. The variable name_lanche is of type char, but this is the number of characters defined, so I am using it as a string. I ne...
asked by 07.09.2016 / 22:56
1
answer

Convert hexadecimal string to output readable in C

I would like to save a text in hexadecimal, and calling a function, the hexadecimal string is converted to a readable char string ie decoding hexadecimal, such as 0x6f0x69 to oi . I've tried the following: #include <stdlib.h...
asked by 04.09.2016 / 22:00
1
answer

How to concatenate a string and an integer value in javascript?

Well, I have 15 similar lines in my code, and the only thing that changes is id of elements that end in an increasing integer and different from the others ... I tried to replace these lines using a loop , but every time I try to run...
asked by 13.01.2016 / 02:35
1
answer

How to read text files and put the words in a vector?

I need to make a code that reads a text file (txt) and save only the words in the positions of a vetor , below my code follows: int main(int argc, char** argv) { FILE *file; file = fopen("arquivo.txt", "r"); char x[100];...
asked by 16.01.2016 / 16:27
1
answer

Remove X first elements from a string

I have the following code: copia = num.Text; copia = copia.Substring(cobrar.Length + 1, copia.Length); num.Text = copia; Example: cobrar = "teste"; copia = "numero"; num.Text = cobrar + copia; //não é só isso, por isso quero rem...
asked by 24.09.2015 / 22:13