On 2017-12-05 15:34, Mengu wrote:

this is how i'd do it:

string upcaseFirst(string wut) {
   import std.ascii : toUpper;
   import std.array : appender;

   auto s = appender!string;
   s ~= wut[0].toUpper;
   s ~= wut[1..$];
   return s.data;
}

That's not Unicode aware and is only safe to do with single byte characters.

--
/Jacob Carlborg

Reply via email to