Questions tagged as 'string'

1
answer

Alphabetic ordering c #

I have a program in C #, that entering the names of three countries with their respective temperatures, calculates the average annual temperature of each one. Then he prints them in alphabetical order. When finished, print the country with the h...
asked by 25.10.2018 / 04:05
3
answers

Save string of characters in C

How could I read a character string and store it in a variable? The variable must not have a fixed size. It's costing me a little. Thanks! I'm sorry I have hardly any code, everything I try is wrong. I'm trying to do it with a malloc but ther...
asked by 03.11.2016 / 18:46
1
answer

Add a space between each character

I try to separate the characters of a String by spaces using a regular expression. That is, 111 results 1 1 1 or ABC results A B C and the output should be a string. String nombre = "111"; nombre = nombre.rep...
asked by 25.03.2018 / 14:17
3
answers

How to return a string format with C #?

I have the following value. String dato="SDI87H"; And I wish to return SD-I8-7H I've tried with String.Format("{0:##-##-##}", dato); But it is not, since the value that must be delivered is numeric, but in this case I must deliver...
asked by 05.09.2017 / 01:45
2
answers

Convert String to matrix

I have this string in Java String str = "a, b, c, d, e, f, g, h, i, j, k, l, m, , n, o, p"; And I need to convert it into a matrix where the rows and columns are specified. That is: 3 by 3 a b c d e f g h i O 2 for 8 a b...
asked by 01.04.2018 / 06:24
1
answer

How to know if an object is a string [closed]

When I double click on the cell of an ExtJs grid returns the uuid but when selecting the button I return the object as such. How can I know if what returns to me is a string or an object?     
asked by 15.03.2016 / 15:08
1
answer

How can I add two long integers passed as a string? c #

First of all, I want to thank you for your time when it comes to reading my question. I am new to c # and in programming in general, and I am having problems with something simple. I want to add two long integers as a string of text, I have reac...
asked by 06.07.2018 / 18:25
2
answers

Calculate the length of each string within an array with the .map method

Good morning, I'm not sure how the map method works, does one function for each element of array as foreach ? Thanks I would like to know how to do this = > Take an array of strings and turn it into an array of num...
asked by 08.12.2017 / 14:42
2
answers

Determine how many vowels a chain has in java [closed]

Implement, using the String class, an application that counts the number of vowels in a text. The algorithm that I have designed is the following: However, when I try to code the algorithm, everything goes fine until I try to buy wit...
asked by 10.02.2018 / 08:42
2
answers

Why do I get the total of the characters as a result?

The idea is to count the number of times a letter appears in a sentence; in this case it is b, but it gives me as a result the total of all the letters char x='b'; String y="hola"; int n=0; for(int i=0;i<y.l...
asked by 28.10.2018 / 17:24