On 31/08/2014 at 05:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
---------
Hi folks,
I'm trying to add a space to the beginning of a string for drawing inside of a user area, but the spaces added to the beginning of a string to draw seem to be ignored. The string is taken from a line fed into a function that splits the line of text into a series of strings (necessary as I'm colouring the text). Before going into workarounds like off-setting the text's draw, it would be simpler if I could just use the space as what they are meant for - a space! I've tried the following, but neither seem to work:
String str = "";
str += " "; // doesn't work
str += "\40" // doesn't work (ASCI Oct character table equivalent)
Depending on the line that's fed to the function, there could be any number of spaces preceding the next bit of visible text. Is there a way to force the string variable to accept a space, or spaces, in the beginning? Or, is there a way to do this using the operator and/or cstring-related steps (I'm not really familiar with working on strings at this level - but am happy to learn and use them!)?
Cheers,
WP.