Group string: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
No edit summary
imported>StDoodle
mNo edit summary
Line 1: Line 1:
string [int,int] group_string( string, string )
{{#vardefine:name|group_string}}
{{#vardefine:name|group_string}}
{{#vardefine:return_type|string [int, int]}}
{{#vardefine:return_type|string [int, int]}}

Revision as of 16:03, 5 March 2010



needs(code_samples);

Function Syntax

string [int, int] group_string(string group_me ,string group_by )

  • group_me is the string to split into groups
  • group_by is the regular expression to group by

This function returns a map keyed by an integer pair of text in group_me matching the regular expression group_by. Exactly how is unclear.

More Information

See this thread for details.


Attention KoLmafia Experts!

We need your help; some details of this function's operation are unknown or unclear.

The following specific questions have been raised:

  • The regex isn't too hard to parse, but the results are.
  • For results, I always see [int,0] and [int,1] keys; huh?