- avoid exposing an internal Split method inside blocks
- fix/test default delimiter +
remove_empty_fields
- performance improvements
- delegate to
String#splitwhere possible - use a regular class for Split rather than values.rb
- create Split objects directly rather than allocating intermediate hashes
- delegate to
String#splitincompatibility: we no longer trim the string (withString#strip) before splitting if the delimiter is omitted
ss.split(str, " ")is no longer treated the same asss.split(str)i.e. unlike Ruby'sString#split, the former no longer strips the string before splitting- rename the
remove_emptyoptionremove_empty_fields - rename the
excludeoptionexcept(alias forreject)
- add support for descending, negative, and infinite ranges,
e.g.
ss.split(str, ":", at: [..4, 4..., 3..1, -1..-3])etc.
- correctly handle backreferences in delimiter patterns
- set StringSplitter::VERSION when
string_splitter.rbis loaded
- add a
reject/excludeoption which rejects splits at the specified positions - add a
selectalias forat
- don't treat string delimiters as patterns
- remove the
offsetalias forsplit.index
- remove trailing empty field when the separator is empty (#1)
- rename the
default_separatoroptiondefault_delimiter
- make
index(AKAoffset) 0-based and addposition(AKApos) as the 1-based accessor
- the block now takes a single
splitobject with anindexaccessor, rather than separateindexandsplitarguments
- add support for negative indices in the value supplied to the
atoption - add a
countfield to the split object containing the total number of splits
- initial release