Why can TRIM remove more than one intended suffix?
The second trim argument supplies a set of removable characters for both ends. Removal continues while an edge character belongs to that set.
SQLite example and interpretation
Trimming ab from abXbaa leaves X. Check the complete suffix when removing a file extension as a unit.
SELECT trim('abXbaa','ab');Result [["X"]]
中文
为什么 TRIM 会删掉比指定后缀更多的字符?
trim 的第二参数是一组可从两端删除的字符,删除可连续发生。
SQLite 示例与适用条件
对 abXbaa 使用 ab,最后只剩 X。若要剥除完整文件扩展名,应先匹配整段后缀。
SELECT trim('abXbaa','ab');结果 [["X"]]