Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Replace all spaces in a string in C++
#include <iostream> #include <cctype> // isalpha, isspace etc #include <string> std::string trim(const std::string& entry){ std::string trimmed; for(const auto &c: entry){ if(!isspace(c)) trimmed += c; } return trimmed; } int main() { std::cout << trim("Behre \n \t this \v and this too ") << std::endl; return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Workaround for https://github.com/Project-OSRM/osrm-backend/pull/4385
123
map_file_mangling
test
Implements.cpp
10dan büyük mü küçük mü
CommandQueue
wrong up
what is this
additional layer of indirection
Please log in to post a comment.