Search code examples
c++stringresizestandard-library

why is my std::string being cut off?


I initialize a string as follows:

std::string myString = "'The quick brown fox jumps over the lazy dog' is an English-language pangram (a phrase that contains all of the letters of the alphabet)";

and the myString ends up being cut off like this:

'The quick brown fox jumps over the lazy dog' is an English-language pangram (a phrase that contains

Where can i set the size limit? I tried the following without success:

std::string myString;
myString.resize(300);
myString = "'The quick brown fox jumps over the lazy dog' is an English-language pangram (a phrase that contains all of the letters of the alphabet)";

Many thanks!


Solution

  • Of course it was just the debugger cutting it off (xcode). I'm just getting started with xcode/c++, so thanks a lot for the quick replies.