{"action":"created","issue":{"url":"https://api.github.com/repos/funcool/cuerdas/issues/17","labels_url":"https://api.github.com/repos/funcool/cuerdas/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/funcool/cuerdas/issues/17/comments","events_url":"https://api.github.com/repos/funcool/cuerdas/issues/17/events","html_url":"https://github.com/funcool/cuerdas/issues/17","id":120248790,"number":17,"title":"Prune is not truncating at the expected position","user":{"login":"nberger","id":81371,"avatar_url":"https://avatars.githubusercontent.com/u/81371?v=3","gravatar_id":"","url":"https://api.github.com/users/nberger","html_url":"https://github.com/nberger","followers_url":"https://api.github.com/users/nberger/followers","following_url":"https://api.github.com/users/nberger/following{/other_user}","gists_url":"https://api.github.com/users/nberger/gists{/gist_id}","starred_url":"https://api.github.com/users/nberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nberger/subscriptions","organizations_url":"https://api.github.com/users/nberger/orgs","repos_url":"https://api.github.com/users/nberger/repos","events_url":"https://api.github.com/users/nberger/events{/privacy}","received_events_url":"https://api.github.com/users/nberger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-03T19:24:19Z","updated_at":"2015-12-03T20:59:48Z","closed_at":"2015-12-03T20:53:48Z","body":"I think `cuerdas.core/prune` is not truncating at the correct place. I'll show in the form of examples for clojure.test, using the ns aliases form `cuerdas.core-tests`:\r\n\r\n```clojure\r\n(t/testing \"prune\"\r\n  (t/is (= nil (str/prune nil 8)))\r\n  (t/is (= \"Hello...\" (str/prune \"Hello World\" 8)))\r\n  (t/is (= \"Hello (...)\"\r\n           (str/prune \"Hello World\" 10 \" (...)\")))\r\n  (t/is (= \"Hello World\"\r\n           (str/prune \"Hello World\" 11 \" (...)\")))\r\n  (t/is (= \"Hello World, I'm pruning...\"\r\n           (str/prune \"Hello World, I'm pruning strings today!\" 25))))\r\n```\r\n\r\nThe result of running the tests;\r\n\r\n```\r\nFAIL in (cuerdas-tests) (core_tests.cljc:150)\r\nprune\r\nexpected: \"Hello World\"\r\n  actual: \"Hello (...)\"\r\n    diff: - \"Hello World\"\r\n          + \"Hello (...)\"\r\n\r\nFAIL in (cuerdas-tests) (core_tests.cljc:152)\r\nprune\r\nexpected: \"Hello World, I'm pruning...\"\r\n  actual: \"Hello World, I'm pruning strings today!\"\r\n    diff: - \"Hello World, I'm pruning...\"\r\n          + \"Hello World, I'm pruning strings today!\"\r\n```\r\n\r\nI might be missing something, but those are some examples of what I expect from `prune`"},"comment":{"url":"https://api.github.com/repos/funcool/cuerdas/issues/comments/161782967","html_url":"https://github.com/funcool/cuerdas/issues/17#issuecomment-161782967","issue_url":"https://api.github.com/repos/funcool/cuerdas/issues/17","id":161782967,"user":{"login":"nberger","id":81371,"avatar_url":"https://avatars.githubusercontent.com/u/81371?v=3","gravatar_id":"","url":"https://api.github.com/users/nberger","html_url":"https://github.com/nberger","followers_url":"https://api.github.com/users/nberger/followers","following_url":"https://api.github.com/users/nberger/following{/other_user}","gists_url":"https://api.github.com/users/nberger/gists{/gist_id}","starred_url":"https://api.github.com/users/nberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nberger/subscriptions","organizations_url":"https://api.github.com/users/nberger/orgs","repos_url":"https://api.github.com/users/nberger/repos","events_url":"https://api.github.com/users/nberger/events{/privacy}","received_events_url":"https://api.github.com/users/nberger/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T20:59:48Z","updated_at":"2015-12-03T20:59:48Z","body":"Awesome!"}}