Update Strings

2025-11-21 16:33:13 -08:00
parent 9edd256e4f
commit 50881ee4a5

@@ -69,3 +69,22 @@ ehs::Str_8 a = "Hello! How are you?";
ehs::Vector<ehs::Str_8> b = a.Split(" ", 1);
```
**Result:** b == {"Hello!", "How are you?"}
### Find
This method will find the first instance of the delimiter. The first parameter is the delimiter. The second parameter is optional but will output the index of where the delimiter was found at, can be null if you don't care for the index. The third parameter is used for optimization, it can search either from left to right, or from right to left. The fourth parameter is the index result, it can be used to output the index at the beginning of the found delimiter or the ending. It returns true if the delimiter has been found, false otherwise.
```cpp
const Str_8 a = "Hello World!";
UInt_64 i;
if (a.Find("Wo", &i, SearchPattern::RIGHT_LEFT, IndexResult::BEGINNING))
{
Console::Write_8("\"Wo\" found at index " + Str_8::FromNum(i) + ".");
return 0;
}
Console::Write_8("\"Wo\" not found.");
return 1;
```