Questions tagged as 'string'

1
answer

Count characters string

I am counting the characters of a string in PHP. The content of the string is: 10,12,12,22,33. I want to scroll to print one by one and with a "\ n". The problem is that I use strlen, and it counts all the characters including the commas. I want...
asked by 17.12.2014 / 11:46
3
answers

How to replace dynamic string {{snippet}} from a string in C #

I get a string which is dynamically generated example: "Dynamic text {{parametro1}}, plus a piece of text {{parametro2}}." I have a code similar to this in C #: where the name is the same as in braces and the value property is the one that...
asked by 05.06.2016 / 23:23
3
answers

How to stick with only one part of the string? [duplicate]

I have several string's (id-question-18, id-answer-18, id-question-17, id-answer-17) I needed to just write (id Question, id Answer, id question, id answer) How do I do in PHP? The goal is as follows: At this point I have the follow...
asked by 27.10.2015 / 17:11
3
answers

How to convert a String to Int in Javascript?

HTML5: <!DOCTYPE html> <html> <head> <title>JSTest</title> <meta charset="UTF-8"> <script src="JSource.js"></script> </head> <body> <input type="number" id="myinput...
asked by 11.06.2016 / 01:34
2
answers

Using String.Replace the string remains the same

I have the following string : string tt= "{\"Response\":{\"StatusCode\":200,\"StatusMessage\":\"OK\",\"Content\":{\"family\":{\"codigo\":14,\"descricao\":\"Cal\u00e7a\",\"frontoffice\":1,\"posicaofront\":31,\"posicaoprint\":26,\"fundo\":\"#c0...
asked by 17.02.2017 / 14:36
2
answers

How to receive a string and by the switch to check in C?

I have to develop an algorithm that gets the name of a place, for example "School", and based on this, make a check of the string in switch , and if it is "School ", then he sends a message to the user about what to do, for example," Stu...
asked by 28.03.2017 / 00:07
2
answers

Removal of excess white space

How to remove white space within a string ? It would be to remove spaces from a text string, except for simple spaces between words. Like the "tidy up" function in Excel.     
asked by 02.10.2017 / 20:23
2
answers

How to create a vector whose indices are characters of an informed string?

I wanted to create a vector in java in which each index of the vector was a character of a string that I / public static void main(String[] args) { String[] words = {"java"}; System.out.println("\n"+words[3]); //para dar um print na...
asked by 14.11.2017 / 01:17
2
answers

Remove special characters and spaces from a string?

I have a problem, in an app I'm picking up contacts from the phonebook, however I want to make a treatment in the contact numbers that can come like this: (99) 9999-9999 9999-9999 9999 9999 and among other things, the only treatment I did w...
asked by 15.11.2015 / 16:53
2
answers

How do I check if two strings are anagrams of one another?

I need to buy two strings and check if the second is an anagram of the first. I thought about using FOR loop repetition. I think you should first check if they both have the same size, then go through them and check if each letter of the first o...
asked by 29.11.2014 / 02:52