MoneyWorks Manual
Head (listText, numberOfItems, asciiDelimiter)
Result Type: Text
Definition: Returns the first N items from a textual list of items. The list can be delimited by any ascii (not unicode) character, as specified by the delimiter parameter. If numberOfItems is negative, then Head returns all but the last abs(numberOfItems) items of the list. This can be useful for chopping off the total line of an analysis
Examples: Head ("foo,bar,baz", 2, ",")
returns the first 2 elements of the comma-delimited list: i.e: "foo,bar".
Head("a,b,c,d,e,f,g,h", -2, ",")
returns "a,b,c,d,e,f".
See Also:
Dice: Get a subcomponent of a delimited tabular string
Left: Get characters from the start of a string
Mid: Get characters from the middle of a string
Regex_GetMatches: Find tokens using a regular expression
Regex_Match: Test whether a string matches a regular expression
Regex_Replace: Replace text in a string using a regular expression
Regex_Search: Find the first match of a regular expression in a string
Regex_SearchStr: Find the first match of a regular expression in a string and return the matching string
RemoveLeading: Remove characters from the start of a string
RemoveTrailing: Remove characters from the end of a string
Replace: Replace matching text in a string with new text
Right: Get characters from the end of a string
Slice: Get a component of a delimited string
Tail: Get some elements from the end of a delimited string
Trim: Remove whitespace from beginning and end of a string