Removes all spaces from a Big String text except for single spaces between words.
ajBigStrTrim(memory_id, [run_condition], [run_by_function_point_only])
|Argument Name||Argument Type||Description|
|memory_id (big string ID) |
|String||The text or ID of the big string from which you want spaces removed. A big string ID can be retrieved from ajBigStrSet() or configure Big String value from More Tools tab in AlchemyJ ribbon.|
|Boolean||The function will run when the value is TRUE. Otherwise will not run. The default value is TRUE.|
|Boolean||If it equals FALSE, the function can be executed through ‘Excel Calculation’ (can be either Automatic or Manual, Calculate Now or Calculate Sheet) or Preview Function Point. |
If it equals TRUE, the function can be executed with Preview Function Point (AlchemyJ ribbon \ Preview Function Point) only.The default value is TRUE.
The function will return:
1) Return Value: Big String
2) Return Type: Single Value
In this example, we will demonstrate how to removes all spaces from a Big String text except for single spaces between words.
As shown in B1, we have added some extra space before the phrase 'this is a very long string'. To use the ajBigStrTrim formula, firstly we have to convert 'abc' into a big string ID. This is done using the ajBigstrSet formula.
After converting into a big string ID, we can then use the formula as shown in B7 and it will return a Big String value.
To verify the result, we can use the ajBigStrValue formula in B9 to make it into a normal String. As seen in B10, we have successfully removed the extra space before the phrase 'this is a very long string'.
It will return #VALUE! when missing any required parameter or mismatch parameter type. Besides, system will also raise error for below scenario(s).
|Big String ID does not exist.|