Reserves size bytes for the string.
If size is less than or equal to the $(D_PSYMBOL capacity), the function call does not cause a reallocation and the string capacity is not affected.
Desired size in bytes.
String s; assert(s.capacity == 0); s.reserve(3); assert(s.capacity == 3); s.reserve(3); assert(s.capacity == 3); s.reserve(1); assert(s.capacity == 3);
See Implementation
Reserves size bytes for the string.
If size is less than or equal to the $(D_PSYMBOL capacity), the function call does not cause a reallocation and the string capacity is not affected.