Add str.slice
xhochy opened this issue · comments
Uwe L. Korn commented
- ✔️ pandas function
- ✔️ Python function:
[…]
- ✔️/❌ simple C++ STL function: http://www.cplusplus.com/reference/string/string/substr/ (no UTF-8 support)
- ✔️ no need for a regular expression library
- ✔️ no need for a Unicode database
- ❌ cannot pre-compute size, output depends on the occurence of UTF-8 characters
Pseudo-Code:
Inputs: start, end, step
builder = StringBuilder()
for row in enumerate(rows):
if isnull(row):
builder.addnull()
else
builder.add(utf8_slice(row, start, end, step))