If you want to follow an old fart advice, wash your brain from Arduino and learn standard stuff.
There are no strings in C, only arrays of chars that (must) end with a null.
In C, you print using printf(), I suggest you pay a visit to Kernighan and Ritchie’s “The C Programming Language”.
mg_str
is a proprietary construction in mOS (Mongoose-OS), it is a structure holding a pointer to the array and also its length. There are examples on how to use it in the docs.
C++ has a String type, and afaik (I don’t do C++) you can use stream syntax to print. Don’t know if that works in mOS, it should. (Bjarne Stroustrup’s book is perhaps too involved)
Perhaps the easiest way to print text in mOS is to use the LOG macros, check how examples and libraries do it.
#include "mgos.h"
LOG(LL_INFO, ("This is the text I want to print"));