aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-16Redefined CodePoint utility masks as C++14 binary literalsHEADmasterAdrian Kummerlaender
* they are more expressive as the shift-syntax in my opinion
2014-04-16Added static assert of std::string::value_type sizeAdrian Kummerländer
* CodepointIterator only supports UTF-8 encoded single-byte input strings ** this should prevent CodepointIterator from compiling on systems with larger char sizes while providing a helpful error message * improved const-correctness by marking currByte (iterator dereferencing cache) and helper method arguments as const
2014-04-16Switched test case codepoint reference definitions to std::u32stringAdrian Kummerländer
* removes need for defining codepoints as numeric literals * they are now defined as UTF-32 encoded string literals
2014-04-11Simplified bitmask utility functionsAdrian Kummerländer
* they were relocated into a separate compilation unit by 79a65ce ** but I want them to be inlined which is hindered by exactly that ** i.e. the implementations are now moved to the utility header file and marked as inline * removed unnecessary declaration of arguments as reference
2014-04-10Added operator- member implementation and improved test casesAdrian Kummerländer
* operator- takes a reference to a const std::string::const_iterator and as such enables determining the actual position of a codepoint within a string * ranged for loops in test cases now take the iterator value by rvalue reference instead of by value
2014-04-09Switched to standard integer typesAdrian Kummerländer
* i.e. replaced uint8_t with std::uint8_t contained within the standard namespace ** as this version of the types is defined by the standard this should offer better compiler independence and standard compliance * removed unnecessary pointer and reference type arguments in the std::iterator template specializations the CodepointIterator class is derived from
2014-03-12Switched to cmake build systemAdrian Kummerländer
2014-02-15Removed internal codepoint cachingAdrian Kummerländer
* it is not the responsibility of a codepoint iterator to cache the resolved codepoint for reuse ** if this is required by the user of this class can iterate it better in the context it is required ** e.g. implement a "CachedIterator" template
2014-02-15Extracted helper functions and bitmasks into separate compilation unitAdrian Kummerländer
* utility.h and utility.cc now contain the UTF8-codepoint and unit bitmasks and read / write functions * Modified users of these functions and unions accordingly * Added the new compilation unit to the Makefile * Changed bitmask specification from plain integer literals to shift expressions for better readability
2013-10-05Added Makefile, Readme and MIT licenseAdrian Kummerländer
2013-10-05Initial commitAdrian Kummerländer
* CodepointIterator is a simple C++ iterator class which iterates through unicode codepoints in a UTF8-encoded string * It is derived from std::iterator and implements the std::bidirectional_iterator_tag * Dereferencing an instance of the class provides the codepoint as char32_t * Tests require Google Test and use UTF8-samples from http://www.columbia.edu/~fdc/utf8/