#include#include int main() { BString str1 = "world"; str1.Prepend("hello "); std::cout << str1 << std::endl; return 0; }
hello world
#include#include int main() { BString str1 = " "; BString str2 = "world"; str1.Prepend("hello "); str1.Prepend(str2); std::cout << str1 << std::endl; return 0; }
world helloIn conclusion, the BString Prepend function is part of the BeOS BString library and allows us to concatenate a string at the beginning of an existing string.