stdstring tag

5 questions


1 answers
92 views
0
I want to add string and int

I thought it would be easy, but it's hard ㅜㅜㅜWhat should I do to make string name become John21 in the code below?string name = John;int age = 21;


1 answers
113 views
0
Function to determine whether std::string ends with a specific character

In Python, string.endwith could be inspected.Does C++ also have a function that determines whether std::string ends with a specific character or not?

1 years ago

1 answers
82 views
0
Replacing a specific word in a string

string msg1 = hello, hello, kk, kkkk, rrrr;I want to change hello to bye when I'm withstring.replace() is not the function I want

1 years ago

1 answers
130 views
0
Split with string spaces

In C++, if there's a string with a space, What's the best way to split? Not a quick way, but a good way to look.

1 years ago

1 answers
84 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...

1 years ago

© 2024 OneMinuteCode. All rights reserved.