Questions tagged as 'string'

2
answers

Extract date from a String C #

I need to extract two dates from a string which comes in the following format: string teste = "Aprovados por autorizantes da aplicação -> 02/03/2018 à > 02/03/2019"; Being start date and end date. I can still do this, however this str...
asked by 02.03.2018 / 17:29
1
answer

Error formatting string with number

I want to format a string so that it has six digits filled with leading zeros. I'm using the following code: string.Format("{0:000000}", linha.Quant.ToString()); It is returning the following: 67 = 00067 19 = 00019 5 = 0005 9 = 0009...
asked by 14.02.2017 / 01:07
1
answer

"error: 'string' does not name a type" when declaring strings

Follow the code class Nome { public: Nome(string nome, string sobreNome); void exibirNome(); virtual ~Nome(); protected: private: string nome; string sobreNome; }; Error    error: ex...
asked by 27.03.2016 / 13:54
3
answers

How to eliminate excess space in a string?

C code to remove spaces in strings is not working. It stops at running. #include <stdio.h> #include <stdlib.h> #include <string.h> void removerSpacos(char str[]) { int i, j; int tam = strlen(str); for(i=0; i<tam; i++) {...
asked by 26.03.2016 / 18:05
1
answer

How to count how many characters a string has - Swift

I'm having some difficulties with simple things. How do I count how many letras has a variable? let word = wordEasy[0] for var i = 0; i < word.count ?????     
asked by 22.01.2016 / 18:22
2
answers

Get partial name of a process

Is there any way I can get a process that is running by a partial name, like what happens with like in a SQL search? Why I ask this: I have a team viewer custom here for the company. The problem is that if I happen to h...
asked by 07.01.2016 / 20:40
2
answers

String for KeyValuePair using LINQ

I'm getting a string in the format "N1N2S3S4L5L6O7O8X" and needs to be passed to a KeyValuePair or a NameValueCollection . Where the key is the letter and the number the value. { N, 1 } { N, 2 } { S, 3 } How to do this using...
asked by 26.06.2017 / 16:12
2
answers

Transform into json

I have a string: {name:"Sara", daypart:"day", href:"http://pt.stackoverflow.com/questions/ask", bg:"su", temp:"calor", realfeel:"hot", text:"cloudy"} I'm basically looking for a quick way to turn this into JSON, ie put quotation marks (...
asked by 30.06.2015 / 18:58
2
answers

Separating a String, how do I?

I have one: String url = intent://instagram.com/_u/fabiohcnobre/#Intent;package=com.instagram.android;scheme=https;end How do I separate it so that I get a String link = instagram.com/_u/fabiohcnobre and a String package = com.i...
asked by 29.10.2016 / 22:19
2
answers

Formatting String with DateFormat using a TimeZone is not working

In my web service, there is an endpoint that returns me a timestamp in UTC and I have a method that generates a date formatted from this timestamp: formatDate(1432313391, "UTC"); public String formatDate(long date, String time...
asked by 22.05.2015 / 19:11