| 1227 | } |
| 1228 | |
| 1229 | void FString::ReallocBuffer (size_t newlen) |
| 1230 | { |
| 1231 | if (Data()->RefCount > 1) |
| 1232 | { // If more than one reference, we must use a new copy |
| 1233 | FStringData *old = Data(); |
| 1234 | AllocBuffer (newlen); |
| 1235 | StrCopy (Chars, old->Chars(), newlen < old->Len ? newlen : old->Len); |
| 1236 | old->Release(); |
| 1237 | } |
| 1238 | else |
| 1239 | { |
| 1240 | if (newlen > Data()->AllocLen) |
| 1241 | { |
| 1242 | Chars = (char *)(Data()->Realloc(newlen) + 1); |
| 1243 | } |
| 1244 | Data()->Len = (unsigned int)newlen; |
| 1245 | } |
| 1246 | } |
| 1247 | |
| 1248 | TArray<FString> FString::Split(const FString &delimiter, const EmptyTokenType keepEmpty) const |
| 1249 | { |
no test coverage detected