Commit Graph

9 Commits

Author SHA1 Message Date
devin doucette
9c37929019 String: Extended ParseTokens and ParseLines
- Added option flags to control skipping empty tokens/lines, trimming tokens/lines, and ignoring delimiter case.
- Added overloads that add to an output object, such as an array.

#rb Zousar.Shaker
#preflight 61afaba0f27f993dc82117eb

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18400340 in //UE5/Release-5.0/... via CL 18400346
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18400354 by devin doucette in ue5-release-engine-test branch]
2021-12-07 16:35:00 -05:00
matt peters
7a7f3642cb #jira UE-126012
UE::String::Find functions: Fix crash when View to search is empty with Data==nullptr.
#rb Devin.Doucette
#rnx

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 18259742 in //UE5/Release-5.0/... via CL 18259757
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18259768 by matt peters in ue5-release-engine-test branch]
2021-11-22 12:19:41 -05:00
devin doucette
18af1d3ea9 Added UTF-8 support to a few functions
#rb Zousar.Shaker
#rnx
#preflight 611bfbf42c1f1c0001ce1194

#ROBOMERGE-SOURCE: CL 17210836 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17210856 by devin doucette in ue5-release-engine-test branch]
2021-08-17 23:45:31 -04:00
Devin Doucette
940e894eec Added BytesToHexLower and cleaned up BytesToHex and HexToBytes
#rb Zousar.Shaker

[CL 15083290 by Devin Doucette in ue5-main branch]
2021-01-14 09:52:51 -04:00
devin doucette
8987554ad9 Changed indentation of code in namespaces
#rb none
#rnx

[CL 14547954 by devin doucette in ue5-main branch]
2020-10-22 15:17:01 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
devin doucette
f50c772c5d Add UE::String::BytesToHex, UE::String::HexToBytes, FString += FStringView
- Both hex functions work the same as their FString equivalents but without requiring FString as input or output.
- Optimize TCharToNibble to do a check at the end instead of at the start, as the previous implementation causes the character ranges to be tested twice.
- Change HexToBytes from FString to use UE::String::HexToBytes.
- Add FString += FStringView to facilitate conversion to FStringView.

#rb Matt.Peters, Steve.Robb
#ushell-cherrypick of 10711451 by Devin.Doucette
#ushell-cherrypick of 10720873 by Devin.Doucette


#ROBOMERGE-SOURCE: CL 11162861 via CL 11162877 via CL 11162886
#ROBOMERGE-BOT: (v640-11091645)

[CL 11166825 by devin doucette in Main branch]
2020-01-29 15:14:57 -05:00
devin doucette
9bee01e44a Implement LexFromString from FStringView for primitive types
These implementations are not optimized yet. They exist to allow conversion from FString to FStringView.

#rb Matt.Peters, Steve.Robb
#ushell-cherrypick of 10720867 by Devin.Doucette


#ROBOMERGE-SOURCE: CL 11162860 via CL 11162876 via CL 11162885
#ROBOMERGE-BOT: (v640-11091645)

[CL 11166821 by devin doucette in Main branch]
2020-01-29 15:14:54 -05:00
devin doucette
1e26a384a7 Add UE::String::ParseLines, UE::String::ParseTokens[Multiple]
- UE::String::ParseLines can be used to split a string view on line endings to find the non-empty lines in the view. Intended to replace functions like FString::ParseIntoArrayLines and FFileHelper::LoadFileToStringArray.
- UE::String::ParseTokens[Multiple] can be used to split a string view on one or more single-character or multi-character delimiters. Intended to replace FString::ParseIntoArray. Separate handling of single-character delimiters reduced the cost by 27% in the case being profiled.
- Extend Algo::CompareByPredicate to allow the input ranges to be different types and to take them by universal reference.
- Extend TArrayView and MakeArrayView to allow array views to be created from initializer lists.

#rb Matt.Peters, Steve.Robb
#ushell-cherrypick of 10720885 by Devin.Doucette
#ushell-cherrypick of 10812084 by Devin.Doucette


#ROBOMERGE-SOURCE: CL 11162858 via CL 11162872 via CL 11162884
#ROBOMERGE-BOT: (v640-11091645)

[CL 11166820 by devin doucette in Main branch]
2020-01-29 15:14:51 -05:00