This sub-namespace provides some utility classes which are related to string classes found in namespace alib::strings.
A utility namespace function that defines a table of token objects from external resourced strings.
It is possible to provide the table lines in two ways:
- In one resource string: In this case, parameter outerDelim has to specify the delimiter that separates the records.
- In an array of resource strings: If the resource string as given is not defined, this method appends an integral index starting with
0
to the resource name, parses a single record and increments the index. Parsing ends when the next higher index is not found.
The second option is recommended for larger token sets. While the separation causes some overhead in a resource backend, the external (!) management (translation, manipulation, etc.) is most probably simplified with this approach.
- Note
- The length of the given table has to fit to the number of entries found in the resource pool. To ensure this, with debug-builds, parameter dbgSizeVerifier has to be provided (preferably by using macro ALIB_DBG(, N)).
- Availability
- This function is an extension, which is injected by the higher-level module ALib Resources and is accessed through the header file ALib.Resources.H. Furthermore, the module ALib EnumRecords has to be included in the ALib Build.
- Parameters
-
resourcePool | The resource pool to load the resource from. |
resourceCategory | The resource category. |
resourceName | The resource name. |
target | The table to fill. |
dbgSizeVerifier | This parameter has to be specified only in debug-builds and provides the expected size of the resourced table. To be surrounded by macro ALIB_DBG (not to be given in release-builds.) |
outerSeparator | The character that separates the entries. Defaults to ',' . |
innerSeparator | The character that separates the values of an entry. Defaults to ' ' (space). |
- Module Dependencies
- This method is only available if the modules ALib Resources and ALib EnumRecords are included in the ALib Build.