string tag

223 questions


1 answers
163 views
0
Can I change the string to dict?

s = {'muffin' : 'lolz', 'foo' : 'kitty'} -> {'muffin' : 'lolz', 'foo' : 'kitty'}I want to change the string to dict like this.My co-developer made me return the string on all functionsWhen replacin...

2 years ago

1 answers
77 views
0
Is there a way to cut strings based on multiple characters?

No matter how much I look for it, I only see cutting based on blank characters and removing blank characters from the front and backI can't cut strings based on multiple characters.mystr = Hey, you - ...

2 years ago

1 answers
177 views
0
How do I erase an empty string from the list?

How do I erase all the empty strings in the list elements?I want to make better chords than the ones I wrotePlease tell me more Python-like chordswhile '' in str_list: str_list.remove('')

2 years ago

1 answers
118 views
0
To find out if a specific string exists in a string

When there is a variable of string typeHow do I find out if there is a specific string in it?, for example,Hello, It's me, for the me true, ., the ???? The false, such as .I'd like you to find the ind...

2 years ago

1 answers
169 views
0
How do I change the string to boolean?

How do I change the string to boolean?def strToBool(s): return str.toupper() == TRUEIs there any function that Python provides other than what I define together?


1 answers
79 views
0
How do I put a space in a string in Java?

What is the easiest way to put a space in a string in Java?I think there's something in an API like StringUtil, but it doesn't come out when I look it up. Please teach me.

2 years ago

1 answers
165 views
0
What is the best way to put a char array in the string?

char[] a = {'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'};There's a string like this String b = new String(a);Is there a better way than this?

2 years ago

1 answers
147 views
0
What is the difference between "chars[]" and "char*s"?

In C, when saving a string,There are two ways together. What's the difference between these two?I want to know what actually happens on memory when I compile, when I run.

2 years ago

1 answers
128 views
0
I want to erase the last character from the string, how do I do it?

public String method(String str) { if (str.charAt(str.length()-1)=='x'){ str = str.replace(str.substring(str.length()-1), ); return str; } } else{ return str; }}I tried to erase the last character ...

2 years ago

1 answers
110 views
0
How do I put a String in the Stream in Java?

I want to convert the String value into InputStreamReader, what should I do?

2 years ago
« - 3 - »

© 2024 OneMinuteCode. All rights reserved.