Questions tagged as 'string'

3
answers

Make PHP account in the order that is in the string

I need an order of calculation that is in the string to be done in the order that is in it. For example: $string = '(10*10)+(30-5)/2'; I need PHP to interpret this not as a string , but rather as a calculation and do according to what ha...
asked by 08.09.2016 / 03:00
1
answer

Get values separated by spaces in Java

Could someone explain to me how I can get values separated by spaces in Java? For example, the user informs all at once the following values: 1 2 3 and I have to put each value in a variable.     
asked by 23.06.2015 / 16:11
3
answers

Divide a string that contains scores

I'm trying to split the following string Eu irei amanhã à casa. E tu vens? To get the following result inside an array in php array( [0] => eu [1] => irei [2] => amanhã [3] => à [4] => casa [5] =>...
asked by 25.01.2017 / 19:38
2
answers

How to split a string into array in JavaScript?

There is an elegant way to split a string into an array based on the example: var x = "FAT* FAT32*"; And that would result in something like this: x[0] = "FAT*"; x[1] = "FAT32*";     
asked by 22.01.2015 / 14:24
4
answers

How to get value from a String before a special character

Hello, good morning. I'm having a little question, how can I get the value of a String before some special character. For example, Clinica Antonio S / S. I would just take the Clinica Antonio S, what comes after the bar does not need to be picke...
asked by 20.04.2015 / 16:51
2
answers

How to use C # quotes?

I'm starting to program in C # and I'm having some difficulties with the quotation marks when I need to paste some text. In Python I could use the triple quotation marks to paste some text that there was a line break, already in C # I have no id...
asked by 15.11.2018 / 13:43
3
answers

How to remove spaces from a string in C?

I want to remove spaces from a string , example: Pedro Henrique Ribeiro I would stay: Pedrohenriqueribeiro The code I made, removes the space, but duplicates a letter: #include <stdlib.h> #include <stdio.h> #include <...
asked by 06.05.2016 / 16:19
3
answers

How to replace the number of letters of a word with a character?

I'm doing a hangman game, let's suppose I type the name "john" in a text box, shortly after I press a button and I want it in the "text 2" box to appear " _ _ _ _ ", then I want the same number of underlines to appear as the number of letters....
asked by 03.06.2017 / 20:40
2
answers

Save values in Hashtable

When I save the value of this Hastable it gives me error. Follow the code: Hashtable ht = new Hashtable(); ht.Add("index", index); ht.Add("tipo", "1"); string tipo = ht["tipo"];     
asked by 09.06.2016 / 16:58
2
answers

What is Java's sort?

Every programmer knows that a list of arrays is printed neatly, but in the middle of the path has sort() . The result of this impression was: Abacaxi Banana Laranja Manga I imagined it would print this way: Banana Laranja...
asked by 14.10.2018 / 13:54