![]() |
Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
|
Protected Member Functions | |
| array< int > | IndicesOf (string input, string search) |
Static Protected Member Functions | |
| static bool | ContainsDigit (string input) |
| static bool | ContainsUppercase (string input) |
| static bool | ContainsLowercase (string input) |
| static int | CountOccurrences (string haystack, string needle, bool caseInsensitive=false) |
| static string | Filter (string input, string characters, bool useCharactersAsBlacklist=false) |
| static bool | IsFormat (SCR_EStringFormat format, string input) |
| static bool | CheckCharacters (string input, bool allowLC, bool allowUC, bool allowDigits, bool allowUnderscore=false) |
| static string | Ellipsis (string input, int maxLength) |
| static string | Format (string input, notnull array< string > arguments) |
| static string | FormatValueNameToUserFriendly (string valueName) |
| static string | FormatResourceNameToUserFriendly (ResourceName resourceName) |
| static string | FormatSnakeCaseToUserFriendly (string snakeCase) |
| static array< float > | GetFloatsFromString (string input, string splitter=SPACE) |
| static array< int > | GetIntsFromString (string input, string splitter=SPACE) |
| static array< string > | GetLines (string input, bool removeEmptyLines=false, bool trimLines=false) |
| static int | IndexOf (string input, notnull array< string > samples) |
| static int | IndexOfFrom (string input, int start, notnull array< string > samples) |
| static string | InsertAt (string input, string insertion, int insertionIndex=0) |
| static bool | IsEmptyOrWhiteSpace (string input) |
| static bool | IsTranslationKey (string input) |
| static string | Join (string separator, notnull array< string > pieces, bool joinEmptyEntries=true) |
| static string | Join (string separator, notnull array< bool > pieces, bool numerical=false) |
| static string | Join (string separator, notnull array< int > pieces) |
| static string | Join (string separator, notnull array< float > pieces) |
| static int | GetLevenshteinDistance (string word1, string word2, bool caseSensitive=true) |
| static float | GetLevenshteinDistanceScore (string word1, string word2, bool caseSensitive=true) |
| static int | GetDamerauLevenshteinDistance (string word1, string word2, bool caseSensitive=true) |
| static float | GetDamerauLevenshteinDistanceScore (string word1, string word2, bool caseSensitive=true) |
| static string | PadLeft (string input, int length, string padding=SPACE) |
| static string | PadRight (string input, int length, string padding=SPACE) |
| static string | ReplaceRecursive (string input, string sample, string replacement) |
| static string | ReplaceMultiple (string input, notnull array< string > samples, string replacement) |
| static string | ReplaceTimes (string input, string sample, string replacement, int howMany=1, int skip=0) |
| static string | Reverse (string input) |
| static bool | SimpleStarSearchMatches (string haystack, string needle, bool caseSensitive, bool strictMatch) |
| static string | UCFirst (string input, bool lcRest=false) |
| static string | UCFirstAll (string input, bool lcRest=false) |
| static bool | ContainsAny (string input, notnull array< string > needles) |
| static bool | ContainsEvery (string input, notnull array< string > needles) |
| static bool | ContainsOnly (string input, string characters, bool useCharactersAsBlacklist=false) |
| static bool | StartsWithAny (string input, notnull array< string > lineStarts) |
| static bool | EndsWithAny (string input, notnull array< string > lineEnds) |
| static string | TrimLeft (string input) |
| static string | TrimRight (string input) |
Static Protected Attributes | |
| static const string | TRANSLATION_KEY_CHARS = UNDERSCORE + DASH |
| static const int | MIN_LC = 97 |
| static const int | MAX_LC = 122 |
| static const int | MIN_UC = 65 |
| static const int | MAX_UC = 90 |
| static const int | MIN_DIGIT = 48 |
| static const int | MAX_DIGIT = 57 |
Definition at line 1 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Check if the provided string respects all the limitations
| [in] | allowLC | allow LowerCase characters (abc..xyz) |
| [in] | allowUC | allow UpperCase characters (ABC..XYZ) |
| [in] | allowDigits | allow all numbers (012..789) |
| [in] | allowUnderscore | allow underscore (_) |
Definition at line 178 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Check if input contains any needles
| [in] | input | |
| [in] | needles |
Definition at line 1240 of file SCR_StringHelper.c.
Check if the provided input contains any digit
| [in] | input |
Definition at line 48 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Check if input contains every needles
| [in] | input | |
| [in] | needles |
Definition at line 1259 of file SCR_StringHelper.c.
Check if the provided input contains any lowercase character (a-z)
| [in] | input |
Definition at line 80 of file SCR_StringHelper.c.
|
inlinestaticprotected |
| [in] | input | the input string |
| [in] | characters | the characters that must compose input or that must not be present depending on useCharactersAsBlacklist |
| [in] | useCharactersAsBlacklist | false for characters to be a whitelist, true for a blacklist |
Definition at line 1278 of file SCR_StringHelper.c.
Check if the provided input contains any uppercase character (A-Z)
| [in] | input |
Definition at line 64 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Gets the amount of times a needle is found in the haystack. e.g looking for "AA" in "AAAAA" will find it twice.
| [in] | haystack | the string in which to search |
| [in] | needle | the string to find |
| [in] | caseInsensitive | if set to true, the search will be case-insensitive (e.g "A" will match "a" and vice-versa) |
Definition at line 99 of file SCR_StringHelper.c.
To be used for debug texts only, NOT in-game texts as this does not support UTF-8!
| [in] | input | |
| [in] | maxLength |
Definition at line 229 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Find out if a string's ending matches one of the provided endings
| [in] | input | the string to check |
| [in] | lineEnds | the endings to parse |
Definition at line 1340 of file SCR_StringHelper.c.
|
inlinestaticprotected |
| [in] | input | the input string |
| [in] | characters | the characters to either respect or remove depending on useCharactersAsBlacklist |
| [in] | useCharactersAsBlacklist | false for characters to be a whitelist, true for a blacklist |
Definition at line 136 of file SCR_StringHelper.c.
|
inlinestaticprotected |
format with string arguments in the form of an array
| [in] | format | with %1, %2 etc |
| [in] | arguments | array |
Definition at line 246 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Turns "{GUID012345678910}Prefabs/Characters/Factions/Faction/Character_FactionName_NLAW.et" into "Character FactionName NLAW"
| [in] | resourceName |
Definition at line 395 of file SCR_StringHelper.c.
Turns "THIS_IS_AN_ENUM" or "tHIs_is_aN_enUM" into "This Is An Enum"
| [in] | snakeCase | any string with words separated by underscores |
Definition at line 406 of file SCR_StringHelper.c.
Turns e.g m_bIsValid to "Is Valid", m_bUsesAMagazine to "Uses A Magazine", m_bExportToPDFDocument to "Export To PDF Document"
| [in] | valueName |
Definition at line 275 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Calculate the Damerau-Levenshtein Optimal string Alignment (OSA) distance between two words (https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance)
| [in] | word1 | |
| [in] | word2 | |
| [in] | caseSensitive |
Definition at line 836 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Definition at line 905 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Gets float values array from a string (e.g { 0.3, 5.0, 7.9 } from "0.3 5.0 abc 7.9")
| [in] | input | |
| [in] | splitter | space by default, can be a comma from e.g IEntitySource values |
Definition at line 423 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Gets int values array from a string (e.g { 3, 5, 7 } from "3 5 abc 7")
| [in] | input | |
| [in] | splitter | space by default, can be a comma from e.g IEntitySource values |
Definition at line 444 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Calculate the Levenshtein distance between two words (https://en.wikipedia.org/wiki/Levenshtein_distance)
| [in] | word1 | |
| [in] | word2 | |
| [in] | caseSensitive |
Definition at line 733 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Definition at line 814 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Obtain an array of lines from a multiline string - split is done on the \n character
| [in] | input | |
| [in] | removeEmptyLines | if true, remove empty lines (including trimmed ones) |
| [in] | trimLines | if true, trim lines |
Definition at line 466 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Finds the first occurrence of the provided samples
| [in] | input | |
| [in] | samples |
Definition at line 501 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Finds the first occurrence of the provided samples from a position
| [in] | input | |
| [in] | start | |
| [in] | samples |
Definition at line 527 of file SCR_StringHelper.c.
| [in] | input | |
| [in] | search |
Definition at line 551 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Insert a string into another string
| [in] | input | the text in which to insert |
| [in] | insertion | the text to insert |
| [in] | insertionIndex | default 0 |
Definition at line 580 of file SCR_StringHelper.c.
| [in] | input |
Definition at line 594 of file SCR_StringHelper.c.
| [in] | format | |
| [in] | input | must be ASCII |
Definition at line 155 of file SCR_StringHelper.c.
Returns if the provided string is in the translation key format (e.g #AR-Translation_Value_3) - the pound sign (#) must be present!
| [in] | input |
Definition at line 603 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Joins bools together as string
| [in] | separator | usually "," for an int array |
| [in] | pieces | the pieces to be joined |
| [in] | numerical | whether or not true is stringified as 1 and false as 0, or written full text ("true" and "false") |
Definition at line 665 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Joins floats together as string
| [in] | separator | usually "," for a float array |
| [in] | pieces | the pieces to be joined |
Definition at line 709 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Joins ints together as string
| [in] | separator | usually "," for an int array |
| [in] | pieces | the pieces to be joined |
Definition at line 687 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Joins strings together (reverse operation of string.Split)
| [in] | separator | usually ", " for a string array |
| [in] | pieces | the pieces to be joined |
| [in] | joinEmptyEntries | if set to false, will ignore empty pieces (to e.g avoid ", , " occurrences) |
Definition at line 641 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Pads the provided string's left end (start) with the provided padding (cut to the exact length) Will not do anything if input is already longer than length or if padding is empty If input is longer, it will not be cut
| [in] | input | |
| [in] | length | |
| [in] | padding |
Definition at line 928 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Pads the provided string's right end (end) with the provided padding (cut to the exact length) Will not do anything if input is already longer than length or if padding is empty If input is longer, it will not be cut
| [in] | input | |
| [in] | length | |
| [in] | padding |
Definition at line 956 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Replaces multiple entries by the same replacement
| [in] | input | |
| [in] | samples | |
| [in] | replacement |
Definition at line 1007 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Replace until there is no trace of search
| [in] | input | the input in which to search and replace |
| [in] | what | to replace - an empty sample will do nothing |
| [in] | replacement | CANNOT contain sample for an obvious reason |
Definition at line 988 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Replace X times a string from within a string from left to right the next occurrence is searched after the previous replacement, there is no overlap
| [in] | input | the input in which to search and replace |
| [in] | sample | what to replace - an empty sample will do nothing |
| [in] | replacement | the replacement string |
| [in] | howMany | times the string must be replaced |
| [in] | skip | first occurrences -not- to be replaced |
Definition at line 1042 of file SCR_StringHelper.c.
Returns the provided input string reversed
| [in] | input |
Definition at line 1085 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Search a string with star-keywords - only supports begin* / end / *contains search format
| [in] | haystack | |
| [in] | needle | the star-based search:
|
| [in] | caseSensitive | whether or not the search is case-sensitive |
| [in] | strictMatch | star is a REQUIREMENT and not a POSSIBILITY:
|
Definition at line 1109 of file SCR_StringHelper.c.
|
inlinestaticprotected |
Find out if a string's beginning matches one of the provided beginnings
| [in] | input | the string to check |
| [in] | lineStarts | the beginnings to parse |
Definition at line 1321 of file SCR_StringHelper.c.
Remove spaces, tabs and line returns on the left end of the provided string Vertical tabs and other characters are ignored and considered as normal characters (for now?)
| [in] | input |
Definition at line 1360 of file SCR_StringHelper.c.
Remove spaces, tabs and line returns on the right end of the provided string Vertical tabs and other characters are ignored and considered as normal characters (for now?)
| [in] | input |
Definition at line 1382 of file SCR_StringHelper.c.
Sets the first found a-zA-Z0-9 character to uppercase, e.g:
| [in] | input | |
| [in] | lcRest |
Definition at line 1170 of file SCR_StringHelper.c.
|
staticprotected |
Definition at line 42 of file SCR_StringHelper.c.
|
staticprotected |
Definition at line 36 of file SCR_StringHelper.c.
|
staticprotected |
Definition at line 39 of file SCR_StringHelper.c.
|
staticprotected |
Definition at line 41 of file SCR_StringHelper.c.
|
staticprotected |
Definition at line 35 of file SCR_StringHelper.c.
|
staticprotected |
Definition at line 38 of file SCR_StringHelper.c.
|
staticprotected |
Definition at line 33 of file SCR_StringHelper.c.