Skip to content

Use String instead of tchar in public classes #4

Description

@michaelrfraser

Story


As a C++ developer,
I want to use std strings instead of raw character arrays,
So that I can feel like I'm not programming in C

Context


When I first started on syscommon, I originally favoured chars over strings because

  • I didn't want to lock people into using the string class
  • It was just another import to bloat things with

However as I've done more and more C++ programming over the years I've really come to appreciate what the string class brings to the table. It's much more safer as a return type and there's less memory management I have to do internally.

It seems that most C++ programmers use the string class anyway, and as a part of std you pretty much get it for free (and we already use plenty of other std classes like map, set etc). It will also open the door to adding things like UUID which I have been hesitant to include previously due to concerns about how its toString method would be implemented.

So this task will involve changing (breaking) all classes to use String (which syscommon typedefs to either string or wstring based on the UNICODE define) over tchar. Better to break it early while noone is using it!

Acceptance Criteria


Once complete:

All public interfaces/methods that currently have tchar in their signature are changed to use String

Update unit tests as necessary

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions