string tag

223 questions


1 answers
79 views
0
Please tell me how to eterate the string

In C++, when approaching a string alphabetically for (int i = 0; i < str.length(); ++i) std::cout << str[i] << std::endl;I did it like this. What do I do with Python?

2 years ago

1 answers
142 views
0
Initialize static const string in class

Isn't it okay to initialize the static const member variable within the class?The error message says to initialize out of line.I don't want to use #define but what should I do Static data member of ty...

2 years ago

1 answers
50 views
0
Python code question

one_more_input = yesuser_select = one_more_input.lower() if(user_select is yes or user_select is y): result = True else: result = Falseprint(result)We are creating a function that returns True if Y ...

2 years ago

1 answers
42 views
0
Is there no null character when storing a string in the c++ string class?

#include <iostream>#include <string>#include <cctype>using namespace std;void ChangeStr(string &s);int main(){ string str; while(1) { cout<<Enter a string (q to end):; cin&...

2 years ago

1 answers
68 views
0
Is there a way to execute the Python code stored in the form of a string?

Is there a way to execute the Python code stored in the form of a string?I thought my friend told me I could do it, but I didn't listen because I thought I didn't need it ㅜ

2 years ago

1 answers
51 views
0
c After initializing the language string, tap for input/output of the rest of the file

After initializing the string to '\0', I took the string and compared it, and I saw '\0' at the end of the string I received, and there are meaningless characters behind it. Is this meaningful? This t...

2 years ago

1 answers
51 views
0
[Basic Java] What happens if you declare String Class and change what you declare?

When using strings in Java String str1 = hello;We have learned that is declared in the constant domain.But if you declare it in the constant field, String str1 = hello; String str2 = hello; If you ...

2 years ago

1 answers
91 views
0
Unicode string appears as false in isinstance()

As far as I know, the integer value should be checked with isinstance(x, int);.However, when I wrote isinstance(x,str);, Unicode is not recognized as a string, so I can't do anything.What should I do?...

2 years ago

1 answers
42 views
0
What is the Java string pool and what is the difference between "s" and "new String" (the "s")

What does String Pool mean? And what is the difference between the two declarations below:String s = hello;String s = new String(hello);Is there a difference that JVM stores two strings?

2 years ago

1 answers
99 views
0
I'd like to print out all the long strings on the GDB

Is there any way to see the entire string in GDB?It keeps getting shorterI need a whole long sentence

2 years ago
« - 10 - »

© 2024 OneMinuteCode. All rights reserved.