nsCString myString("Hello World");
nsCString myString("Hello"); myString.Append(" World");
nsCString myString("Hello World"); nsCString substring; myString.Substring(substring, 6, 5);This extracts a substring starting from the 6th character with a length of 5 characters, resulting in the string "World". The nsCString class is part of the Mozilla Platform library, specifically the nspr library.