{"action":"created","issue":{"url":"https://api.github.com/repos/eligantRU/oop/issues/3","repository_url":"https://api.github.com/repos/eligantRU/oop","labels_url":"https://api.github.com/repos/eligantRU/oop/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/eligantRU/oop/issues/3/comments","events_url":"https://api.github.com/repos/eligantRU/oop/issues/3/events","html_url":"https://github.com/eligantRU/oop/issues/3","id":177557806,"number":3,"title":"Замечания по программе Replace","user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-17T05:41:22Z","updated_at":"2016-09-24T05:18:44Z","closed_at":null,"body":"- [ ] Реализовать линейную сложность в зависимости от размера входной строки\r\n- [ ] Выделить функцию, выполняющую замену всех вхождений искомой строки во входной\r\n- [ ] Обеспечить работу в 64 битной конфигурации\r\n- [ ] Тесты должны запускаться во всех конфигурациях\r\n- [ ] Не используйте exit. Используйте return\r\n- [ ] Напишите скрипт для тестирования"},"comment":{"url":"https://api.github.com/repos/eligantRU/oop/issues/comments/249346132","html_url":"https://github.com/eligantRU/oop/issues/3#issuecomment-249346132","issue_url":"https://api.github.com/repos/eligantRU/oop/issues/3","id":249346132,"user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"created_at":"2016-09-24T05:18:44Z","updated_at":"2016-09-24T05:18:44Z","body":"```c++\r\nstd::string FindAndReplace(const std::string & inputStr, const std::string & searchStr, const std::string & replaceStr)\r\n{\r\n\tauto currentStr = inputStr;\r\n\r\n\tauto it = currentStr.find(searchStr);\r\n\twhile (it != std::string::npos)\r\n\t{\r\n\t\tcurrentStr.replace(it, searchStr.length(), replaceStr);\r\n\t\tit = currentStr.find(searchStr, it + replaceStr.length());\r\n\t}\r\n\treturn currentStr;\r\n}\r\n```\r\n\r\n- [ ] Лучше не использовать имя it для хранения позиции в строках и векторах. Итераторы становятся невалидными при изменении длины строки в большую сторону (итератор - аналог указателя). Лучше использовать pos"}}
{"actor":{"display_login":"alexey-malov"}}