{"action":"closed","issue":{"url":"https://api.github.com/repos/vindarel/cl-str/issues/18","repository_url":"https://api.github.com/repos/vindarel/cl-str","labels_url":"https://api.github.com/repos/vindarel/cl-str/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/vindarel/cl-str/issues/18/comments","events_url":"https://api.github.com/repos/vindarel/cl-str/issues/18/events","html_url":"https://github.com/vindarel/cl-str/issues/18","id":352530730,"node_id":"MDU6SXNzdWUzNTI1MzA3MzA=","number":18,"title":"failed to split a string ends with \"x\" by \"xx\"","user":{"login":"wukgdu","id":31923576,"node_id":"MDQ6VXNlcjMxOTIzNTc2","avatar_url":"https://avatars0.githubusercontent.com/u/31923576?v=4","gravatar_id":"","url":"https://api.github.com/users/wukgdu","html_url":"https://github.com/wukgdu","followers_url":"https://api.github.com/users/wukgdu/followers","following_url":"https://api.github.com/users/wukgdu/following{/other_user}","gists_url":"https://api.github.com/users/wukgdu/gists{/gist_id}","starred_url":"https://api.github.com/users/wukgdu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wukgdu/subscriptions","organizations_url":"https://api.github.com/users/wukgdu/orgs","repos_url":"https://api.github.com/users/wukgdu/repos","events_url":"https://api.github.com/users/wukgdu/events{/privacy}","received_events_url":"https://api.github.com/users/wukgdu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-21T13:08:58Z","updated_at":"2018-08-22T09:10:41Z","closed_at":"2018-08-22T09:10:41Z","author_association":"NONE","body":"`(str:split \"xx\" \"asdxfghx\")` returns `NIL`\r\n```\r\n* (str:split \"xx\" \"asdxfghx\")\r\n\r\nNIL\r\n```\r\nexpect: `(\"asdxfghx\")`\r\n```\r\n* (cl-ppcre:split \"xx\" \"asdxfghx\")\r\n\r\n(\"asdxfghx\")\r\n```\r\n---\r\nReason:\r\n`(if (string-equal separator #\\x) \"y\" \"x\"))` will add \"x\" to the string\r\nthen `(res (butlast (cl-ppcre:split (cl-ppcre:quote-meta-chars (string separator)) val)))` will become:\r\n```\r\n* (cl-ppcre:split \"xx\" \"asdxfghxx\")\r\n\r\n(\"asdxfgh\")\r\n```\r\nand `butlast` gets `NIL`\r\n\r\n---\r\n\r\n `(str:split \"xx\" \"asdxfghxxx\")` and `(str:split \"xx\" \"asdxxfghx\")` get wrong results, too."}}
{"actor":{"display_login":"vindarel"}}