11 Commits

Author SHA1 Message Date
ef39d535e2 Remove iterators from string and string_view
Iterators could probably be implemented efficiently, but it is not a
priority at the moment. They are removed for the time being.
2024-03-07 19:38:00 -07:00
52d91aa752 Change istring to use string_view for the majority of its operations
The istring and string_view operators have identical implementations. By
changing the istring operators to cast to string_view and use that
implementation instead, the number of redundant implementations is
reduced. This does incurr a small performance penalty, around 15 cycles
when tested on the MGBA Gameboy Advance emulator (uses an armv7tdmi).
When compared to the time operations take, the performance difference is
negligible. Ex. An insertion with two 8 character strings takes around
450 cycles.
2024-03-07 16:28:18 -07:00
c9f3a57cfb Implement istring::insert with given index and count 2024-03-07 16:07:21 -07:00
232808770f Implement string::copy and string_view::copy 2024-03-07 15:57:29 -07:00
236b5661ad Fix mtl_rmemcpy32 incorrectly calculating the number of bytes and words 2024-03-07 15:53:10 -07:00
56ea8ad91d Change strings to use mtl::memmove instead of memcpy ot std::memmove 2024-03-07 14:32:46 -07:00
ecac9d2087 Change strings to use string_view instead of const char*
Because the length of a string_view is computed at compile time, it is
faster for simple copies.
2024-03-07 14:25:39 -07:00
913e54252a Add initial string_view implementation 2024-03-07 14:24:10 -07:00
34495b580b Add initial fixed point number implementation 2024-03-06 23:42:48 -07:00
dd07c57d7a Fix rmemcpy32 not copying chunks correctly 2024-03-06 23:00:38 -07:00
3f8bcf2f61 Add cmake files and initial memcpy/string implementation 2024-03-04 20:44:58 -07:00