string tag

223 questions


1 answers
136 views
0
Can I convert strings to numbers in Java?

How do I convert the int value into a String type string in Java?The string that I made is made up of only numbers. I want to convert that string into a number.For example, you want to get the number ...


1 answers
145 views
0
I can't put an integer on a string

I can't put an integer on the string, so what should I do?TypeError: unsupported operand type(s) for +: 'int' and 'str'for i in range (1,10): string=string+i


1 answers
88 views
0
To clear all the opening characters of std:string

I want to erase all the opening characters of the string (including \n, \r, \t).I'm using the method below. Is there a better way?Oh, and tell me how to erase the opening text in front of mestd::strin...

2 years ago

1 answers
58 views
0
Print Braces {}

I want to print {} how do I write it?There's an error in the way I wrote itI want to print it out like {Hello} 42.Key Error: Hello\\x = \{ Hello \} {0} print x.format(42)

2 years ago

1 answers
102 views
0
How do I print out % of special characters instead of "\" when printing?

printf(hello\%); //not like thisIf I use a backslash, it's too hard to see when there are too many special characters, so I want to know another way.I get the same result as that code, but is there a ...

2 years ago

1 answers
39 views
0
A function that determines which index a particular character appears in a string

Where is the function to find out which index a particular character appears in a string?For example, mystring = hellomyindex = mystring.h #myindex = 0I'm looking to this function.

2 years ago

1 answers
37 views
0
What does %w do?

I was looking at the FileUtils data and saw this codeFileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6'I wonder what %w is doing here.

2 years ago

1 answers
119 views
0
I want to take a comma in a thousand units when converting Integer to String, can I do it?

If there's a number called 35634646, I'd like to convert it to String, 35,634,646.Is there a simple way to do it?

2 years ago

1 answers
79 views
0
Removing front and back space characters from Python

I want to remove the first and last blank characters from the stringFor example, Hello --> Hello Hello --> HelloHello --> HelloBob has a cat --> Bob has a catLike this.

2 years ago

1 answers
114 views
0
It says there's no itoa. Why?

http://www.cplusplus.com/reference/cstdlib/itoa/?kw=itoaI used the example here, but it says there's no itoa.What's wrong with you?itoa doesn't exist#include <stdio.h>#include <stdlib.h>in...

« - 19 - »

© 2024 OneMinuteCode. All rights reserved.