Releases: apemsel/AttributedString
Releases · apemsel/AttributedString
v3.0.0
- Updated for modern PHP >= 8.1
- Type definitions
- Fixes for all remaining bugs found by static analysis
- No more dependencies :-)
Full Changelog: v2.0.0...v3.0.0
First 2.x Release
New Features
- Attribute storage is provided by classes implementing the Attribute Interface instead of directly in AttributedString
- New Bitmap class implementing Attribute using a bitmap stored in a string. Very memory efficient.
- BooleanArray class implementing Attribute using a standard PHP array like in AttributedString v1.x. Faster than Bitmap, but uses more than 8x the memory per char length of the string.
- You can inject your own attribute implementations
Incompatible Changes with v1.x
- Unimplemented methods now throw a RuntimeException instead of an InvalidArgumentException
v1.5.3
- convert token offsets from byte to char offset
v1.5.2
- another fix for tokenizeOnWords()
v1.5.1
- fix unicode bug in tokenizeOnWords()
v1.5.0
- ArrayAccess to tokens in TokenizedAttributedString
v1.4.0
- Support ArrayAccess interface in AttributedString and MutableAttributedString
- Fixed two bugs in MutableAttributedStrings
v1.3.0
- toHtml() can now handle overlapping attribute spans, so all AttributedStrings can be converted to HTML and it no longer throws
- new method attributeToString() for debugging/visualization
- more tests and fixes
v1.2.1
- fix bug in setTokenRangeAttribute()
v1.2.0
- new methods filter() and substrings()
- fix bug in searchAttribute()