Add str.endswith
xhochy opened this issue · comments
Uwe L. Korn commented
- ✔️ pandas function
- ✔️ Python function
- ✔️ simple C++ STL function: https://stackoverflow.com/a/62280289/1689261
- ✔️ no need for a regular expression library
- ✔️ no need for a Unicode database
- ✔️ can pre-compute size, output is a boolean array
Pseudo-Code:
Inputs: pat
output = BooleanArray(len(rows))
for i, row in enumerate(rows):
if isnull(row):
output.setnull(i)
else
output[i] = (row[-len(pat):] == pat)