Questions tagged as 'string'

2
answers

How to solve a string formatting error?

I was normally programming in VS in "Console" mode when I come across this message:    "A first chance exception of type 'System.FormatException' occurred in mscorlib.dll   An unhandled exception of type 'System.FormatException' occurred in m...
asked by 10.02.2017 / 04:57
3
answers

C program "eating" characters when executed

Next, All IDEs I program in C are outputting with characters less than each iteration. For example, when executing a for, at each iteration one or more characters are added: NotethatinbothnetbeansandDevC++,thesameerroroccurs.Ithinkit'ssomet...
asked by 03.02.2017 / 23:50
3
answers

How to transform, for example, "0" into "ZERO" in C? What problem in this code?

I have to make a college program whose main purpose is another one, but in one of the program steps, I need to pass two whole random numbers from 0 to 9 to their extensive written forms, in string . I wrote a few snippets of code that would do...
asked by 24.05.2014 / 15:55
3
answers

Remove characters in variable

I have a variable with the following content 00:00:01. I want to take the colon to have as final result 000001. I use the split but the result I have is 00,00,01. var res = min_time.split(':');     
asked by 07.01.2015 / 12:23
5
answers

Get part of a delimited string between characters

I have string as the example below: $string = 'Lorem ipsum dolor sit amet, consectetur /adipiscing elit/.'; My question is, how can I get only the part of the text that is between the% s and% s and at the same time remove that part o...
asked by 19.07.2016 / 15:58
3
answers

convert a string list to a list of integers

x = ['443' , '552' , '342' , '368' , '9867' , '335' , '9412' , '7436' , '1692' , '85' , '990' , '332' , '8816' , '4567' , '279' , '119' , '2290' , '234' , '9863' , '345' , '230' , '5574' , '230' , '5432'] How can I convert this list to a new...
asked by 22.05.2018 / 21:45
1
answer

How to extract sentences from a text in Java?

Recently I read an article that looked at the size of several authors' sentences. It was a stylistic study of his works. How do I read a text (with several paragraphs) and extract its sentences? Preferably in Java.     
asked by 14.03.2017 / 21:43
3
answers

Get the site name in url in javascript

Well, I have the following: I can have the following situations from a url: www.example.com or link or link and also with HTTPS. I would like to take only the word "example". But I do not know where to start because you can have several situ...
asked by 23.02.2017 / 19:34
3
answers

Remove first and last character from a string

I need to remove the first and last character of a String variable, I tried to use substring for this, but it is giving the following error: String index out of range And I'm not finding a way to do this, I've done it so far:...
asked by 24.10.2017 / 19:07
2
answers

Is it right to use string when integer value?

Today I came across a certain situation, which left me with doubts: In my application I have some ID's coming from a table, these ID's are integer values (1,2,3, and so on) and all I treat them as string . One of the re...
asked by 14.10.2016 / 16:46