On Wed, Oct 13, 2010 at 11:44 AM, Julien Cugnière
<julien.cugniere_at_gmail.com> wrote:
> 2010/10/13 Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
>> Another option is a custom SVN::String type which looks / smells /
>> acts like a string, but also allows wrapping the NULL value, in a
>> manner you suggest above.
>
> Sorry to intrude, but just an additional possibility : can the strings
> manipulated by SVN contain embedded NUL characters ( "\0" ) ?
>
> If they can't, then you could use an std::string containing a single
> NUL character to represent the NULL string :
>
> #define SVN_NULL_STRING std::string(1, '\0')
>
> inline std::string getAuthor() const { return ptr ?
> std::string(ptr) : SVN_NULL_STRING; }
Subversion "strings" can be arbitrary byte arrays. I haven't yet
thought about how this translates to C++, but I'm wary of using
something not-quite-standard like the above.
-Hyrum
Received on 2010-10-13 21:22:05 CEST