walterdejong / oolib Goto Github PK
View Code? Open in Web Editor NEWalternate C++ standard library
License: BSD 2-Clause "Simplified" License
alternate C++ standard library
License: BSD 2-Clause "Simplified" License
The performance of the String
class is rather poor. This is because the methods call utf8_decode()
all the time. This is a consequence of the design decision to have the String
be an UTF-8 string internally and have it present itself as a string of characters rather than bytes.
It's probably better to have both a UTF-8 byte-string String
class and a UTF-32 String32
or uString
class and let the programmer decide what she wants to use.
For example, like in Python:
>>> s = '普通话/普通話'
>>> s
'\xe6\x99\xae\xe9\x80\x9a\xe8\xaf\x9d/\xe6\x99\xae\xe9\x80\x9a\xe8\xa9\xb1'
>>> len(s)
19
>>> s[0]
'\xe6'
>>> s[1]
'\x99'
>>> s[2]
'\xae'
>>> us = u'普通话/普通話'
>>> len(us)
7
>>> us[0]
u'\u666e'
(This example demonstrates behavior of len
and operator[]
).
Note that changing the design of String
is a major change that would break backwards compatibility.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.