Jump to content

Component: Advanced String Functions (Utility): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray..."
 
No edit summary
Line 22: Line 22:


==Detailed description==
==Detailed description==


''No detailed description exists yet for this component''
''No detailed description exists yet for this component''


==Examples==
==Examples==


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''






==Macro reference==
==Macro reference==
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InsertInto'''
|-
| colspan="2" | Inserts a string into another string at the specified index position.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | DataString
|-
| colspan="2" | Data string to ammend&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Insert
|-
| colspan="2" | Data to insert&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | InsertionIndex
|-
| colspan="2" | Index location in the string to insert the data&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Line 174: Line 208:
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RemoveFrom'''
|-
| colspan="2" | Allows a set number of characters to be removed from a starting location in a string.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | DataString
|-
| colspan="2" | Data string to ammend&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CharsToRemove
|-
| colspan="2" | Number of characters to remove from the string&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | StartingIndex
|-
| colspan="2" | Index location in the string to delete the data&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}

Revision as of 09:55, 3 February 2023

Author Matrix TSL
Version 1.0
Category Utility


Advanced String Functions component

A component designed to add more advanced functions to the existing built-in string library.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_AdvancedStringFunctions.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_AdvancedStringFunctions.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples



Macro reference

InsertInto
Inserts a string into another string at the specified index position. 
- STRING DataString
Data string to ammend 
- STRING Insert
Data to insert 
- UINT InsertionIndex
Index location in the string to insert the data 
- VOID Return


SearchAndReplace
Attempts to find a specific string inside the data string and if found replaces with the provided replacement string. Returns the number of times the search pattern was found. 
- STRING StrData
Data string to scan 
- STRING StrSearch
String to look for in the data 
- STRING StrReplace
String to insert into the data 
- UINT Return


ExplodeToByteArray
Takes an ASCII string and using a delimiter converts it into an array of bytes. Returns the number of values discovered and placed into the DataArray, e.g. "1,2,3,4" would become {1,2,3,4} 
- STRING StringInput
Data string e.g. "1,2,3,4" 
- BYTE Delimiter
Delimiting character byte for example ',' 
- BYTE DataArray
Data array to hold the numberic values found 
- UINT MaxCount
Maximum number of values to return 
- UINT Return


ExplodeToStringArray
Takes an ASCII string and using a delimiter converts it into an array of strings. Returns the number of values discovered and placed into the DataArray, e.g. "1,2,3,4" would become {"1","2","3","4"} 
- STRING StringInput
Data string e.g. "1,2,3,4" 
- BYTE Delimiter
Delimiting character byte for example ',' 
- STRING DataArray
Data array to hold the numberic values found 
- UINT MaxCount
Maximum number of values to return 
- UINT Return


ImplodeFromByteArray
Creates an ASCII string from an array of byte values. Places a delimiter in between each value. e.g. {1,2,3,4} would become "1,2,3,4" 
- BYTE DataArray
 
- UINT Count
Number of values held in the array 
- BYTE Delimiter
Delimiter to add between values 
- STRING Return


Contains
Scans a string to see if it contains a specific substring. Returns 1 if found, otherwise returns 0. 
- STRING StrData
Data string to scan 
- STRING StrMatch
String to look for in the data 
- BOOL Return


RemoveFrom
Allows a set number of characters to be removed from a starting location in a string. 
- STRING DataString
Data string to ammend 
- UINT CharsToRemove
Number of characters to remove from the string 
- UINT StartingIndex
Index location in the string to delete the data 
- VOID Return


PositionOf
Scans a string to see if it contains a specific substring. Returns the location in the string if found, otherwise returns -1. 
- STRING StrData
Data string to scan 
- STRING StrMatch
String to look for in the data 
- UINT SearchFrom
Starting index for the search, default 0. 
- INT Return


ExplodeToINTArray
Takes an ASCII string and using a delimiter converts it into an array of integers. Returns the number of values discovered and placed into the DataArray, e.g. "1,2,3,4" would become {1,2,3,4} 
- STRING StringInput
Data string e.g. "1,2,3,4" 
- BYTE Delimiter
Delimiting character byte for example ',' 
- UINT DataArray
Data array to hold the numberic values found 
- UINT MaxCount
Maximum number of values to return 
- UINT Return


ImplodeFromStringArray
Creates an ASCII string from an array of string values. Places a delimiter in between each value. e.g. {"1","2","3","4"} would become "1,2,3,4" 
- STRING DataArray
 
- UINT Count
Number of values held in the array 
- BYTE Delimiter
Delimiter to add between values 
- STRING Return


ImplodeFromFloatArray
Creates an ASCII string from an array of float values. Places a delimiter in between each value. e.g. {1.1,2.2,3.3,4.4} would become "1.1,2.2,3.3,4.4" 
- FLOAT DataArray
 
- UINT Count
Number of values held in the array 
- BYTE Delimiter
Delimiter to add between values 
- BYTE Precision
Number of decimal points to add to each float value 
- STRING Return


ExplodeToFloatArray
Takes an ASCII string and using a delimiter converts it into an array of floats Returns the number of values discovered and placed into the DataArray, e.g. "1.1,2.2,3.3,4.4" would become {1.1,2.2,3.3,4.4} 
- STRING StringInput
Data string e.g. "1,2,3,4" 
- BYTE Delimiter
Delimiting character byte for example ',' 
- FLOAT DataArray
Data array to hold the numberic values found 
- UINT MaxCount
Maximum number of values to return 
- UINT Return


ImplodeFromINTArray
Creates an ASCII string from an array of integer values. Places a delimiter in between each value. e.g. {1,2,3,4} would become "1,2,3,4" 
- UINT DataArray
 
- UINT Count
Number of values held in the array 
- BYTE Delimiter
Delimiter to add between values 
- STRING Return



Property reference

Properties