| 641 | } |
| 642 | |
| 643 | void Reserve(size_t Characters) { |
| 644 | if (Characters == Data.Length) return; |
| 645 | if (Characters < Data.Length) { |
| 646 | Resize(Characters); |
| 647 | return; |
| 648 | } |
| 649 | STRING_INFO StringInfo = {}; |
| 650 | if (Characters < SSO_SIZE) { |
| 651 | if (Data.SsoUsing) return; |
| 652 | SetupSso(&StringInfo, SsoBuffer); |
| 653 | Copy(StringInfo.Buffer, Data.Buffer, Data.Length); |
| 654 | Free(&Data); |
| 655 | Data = StringInfo; |
| 656 | } else { |
| 657 | if (Alloc(&StringInfo, Characters)) { |
| 658 | Copy(StringInfo.Buffer, Data.Buffer, Data.Length); |
| 659 | Free(&Data); |
| 660 | Data = StringInfo; |
| 661 | } |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | String& Replace( |
| 666 | const TChar* Substr, |
nothing calls this directly
no outgoing calls
no test coverage detected