{"action":"created","comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/55313572","id":55313572,"diff_hunk":"@@ -142,6 +142,43 @@ CC_DLL unsigned int getIndexOfLastNotChar16(const std::vector<char16_t>& str, ch\n  */\n CC_DLL std::vector<char16_t> getChar16VectorFromUTF16String(const std::u16string& utf16);\n \n+\n+\n+/**\n+* Utf8 sequence\n+* Store all utf8 chars as std::string\n+* Build from std::string\n+*/\n+class CC_DLL StringUTF8","path":"cocos/base/ccUTF8.h","position":11,"original_position":11,"commit_id":"2a201a5c4eaa0802edcfce4da6fcd4cb0a86eafe","original_commit_id":"2a201a5c4eaa0802edcfce4da6fcd4cb0a86eafe","user":{"login":"zilongshanren","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/zilongshanren","html_url":"https://github.com/zilongshanren","followers_url":"https://api.github.com/users/zilongshanren/followers","following_url":"https://api.github.com/users/zilongshanren/following{/other_user}","gists_url":"https://api.github.com/users/zilongshanren/gists{/gist_id}","starred_url":"https://api.github.com/users/zilongshanren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zilongshanren/subscriptions","organizations_url":"https://api.github.com/users/zilongshanren/orgs","repos_url":"https://api.github.com/users/zilongshanren/repos","events_url":"https://api.github.com/users/zilongshanren/events{/privacy}","received_events_url":"https://api.github.com/users/zilongshanren/received_events","type":"User","site_admin":false},"body":"One more question: Do we really need the StringUTF8 encapsulation? I think we have already provided many utf8, utf16 string conversion functions, why bother to provide another StringUTF8 class?\r\nThanks.","created_at":"2016-03-08T03:56:45Z","updated_at":"2016-03-08T03:56:45Z","html_url":"https://github.com/cocos2d/cocos2d-x/pull/15195#discussion_r55313572","pull_request_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195","_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/55313572"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/15195#discussion_r55313572"},"pull_request":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195"}}},"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195","id":61906696,"html_url":"https://github.com/cocos2d/cocos2d-x/pull/15195","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/15195.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/15195.patch","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15195","number":15195,"state":"open","locked":false,"title":"Textfiled support cursor v1.2","user":{"login":"perminovVS","id":126923,"avatar_url":"https://avatars.githubusercontent.com/u/126923?v=3","gravatar_id":"","url":"https://api.github.com/users/perminovVS","html_url":"https://github.com/perminovVS","followers_url":"https://api.github.com/users/perminovVS/followers","following_url":"https://api.github.com/users/perminovVS/following{/other_user}","gists_url":"https://api.github.com/users/perminovVS/gists{/gist_id}","starred_url":"https://api.github.com/users/perminovVS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perminovVS/subscriptions","organizations_url":"https://api.github.com/users/perminovVS/orgs","repos_url":"https://api.github.com/users/perminovVS/repos","events_url":"https://api.github.com/users/perminovVS/events{/privacy}","received_events_url":"https://api.github.com/users/perminovVS/received_events","type":"User","site_admin":false},"body":"Add StringUtils::StringUTF8 for easy manipulate utf8 string.\r\nIf TextField active(focused input text) show text cursor( default '|',\r\nchange TextFieldTTF::setCursorChar ).\r\nShow/Hide interval CURSOR_TIME_SHOW_HIDE\r\nChange position text cursor control key: KEY_HOME, KEY_END,\r\nKEY_LEFT_ARROW, KEY_RIGHT_ARROW\r\nCC_PLATFORM_MAC, CC_PLATFORM_WIN32, CC_PLATFORM_LINUX default use\r\ncursor( For change state TextFieldTTF::setCursorUse )\r\nDesktop implement dispatchControlKey\r\nWinRT support key repeat and implement dispatchControlKey\r\nText cursor worked only on LabelType::TTF\r\n\r\nnew version it: #13903 , for easy merge\r\n\r\nExample use: http://youtu.be/g6jpmaip1fY","created_at":"2016-03-07T11:48:02Z","updated_at":"2016-03-08T03:56:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a242d13f2e89aaf9c1e396604f8027a9320aa145","assignee":null,"milestone":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/28","html_url":"https://github.com/cocos2d/cocos2d-x/milestones/3.11","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/28/labels","id":1495945,"number":28,"title":"3.11","description":"","creator":{"login":"zilongshanren","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/zilongshanren","html_url":"https://github.com/zilongshanren","followers_url":"https://api.github.com/users/zilongshanren/followers","following_url":"https://api.github.com/users/zilongshanren/following{/other_user}","gists_url":"https://api.github.com/users/zilongshanren/gists{/gist_id}","starred_url":"https://api.github.com/users/zilongshanren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zilongshanren/subscriptions","organizations_url":"https://api.github.com/users/zilongshanren/orgs","repos_url":"https://api.github.com/users/zilongshanren/repos","events_url":"https://api.github.com/users/zilongshanren/events{/privacy}","received_events_url":"https://api.github.com/users/zilongshanren/received_events","type":"User","site_admin":false},"open_issues":30,"closed_issues":61,"state":"open","created_at":"2016-01-11T02:06:27Z","updated_at":"2016-03-08T03:03:12Z","due_on":"2016-03-30T16:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195/commits","review_comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195/comments","review_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15195/comments","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/2a201a5c4eaa0802edcfce4da6fcd4cb0a86eafe","head":{"label":"perminovVS:textfiled-support-cursor-v1.2","ref":"textfiled-support-cursor-v1.2","sha":"2a201a5c4eaa0802edcfce4da6fcd4cb0a86eafe","user":{"login":"perminovVS","id":126923,"avatar_url":"https://avatars.githubusercontent.com/u/126923?v=3","gravatar_id":"","url":"https://api.github.com/users/perminovVS","html_url":"https://github.com/perminovVS","followers_url":"https://api.github.com/users/perminovVS/followers","following_url":"https://api.github.com/users/perminovVS/following{/other_user}","gists_url":"https://api.github.com/users/perminovVS/gists{/gist_id}","starred_url":"https://api.github.com/users/perminovVS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perminovVS/subscriptions","organizations_url":"https://api.github.com/users/perminovVS/orgs","repos_url":"https://api.github.com/users/perminovVS/repos","events_url":"https://api.github.com/users/perminovVS/events{/privacy}","received_events_url":"https://api.github.com/users/perminovVS/received_events","type":"User","site_admin":false},"repo":{"id":32330296,"name":"cocos2d-x","full_name":"perminovVS/cocos2d-x","owner":{"login":"perminovVS","id":126923,"avatar_url":"https://avatars.githubusercontent.com/u/126923?v=3","gravatar_id":"","url":"https://api.github.com/users/perminovVS","html_url":"https://github.com/perminovVS","followers_url":"https://api.github.com/users/perminovVS/followers","following_url":"https://api.github.com/users/perminovVS/following{/other_user}","gists_url":"https://api.github.com/users/perminovVS/gists{/gist_id}","starred_url":"https://api.github.com/users/perminovVS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perminovVS/subscriptions","organizations_url":"https://api.github.com/users/perminovVS/orgs","repos_url":"https://api.github.com/users/perminovVS/repos","events_url":"https://api.github.com/users/perminovVS/events{/privacy}","received_events_url":"https://api.github.com/users/perminovVS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/perminovVS/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/perminovVS/cocos2d-x","forks_url":"https://api.github.com/repos/perminovVS/cocos2d-x/forks","keys_url":"https://api.github.com/repos/perminovVS/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/perminovVS/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/perminovVS/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/perminovVS/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/perminovVS/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/perminovVS/cocos2d-x/events","assignees_url":"https://api.github.com/repos/perminovVS/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/perminovVS/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/perminovVS/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/perminovVS/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/perminovVS/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/perminovVS/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/perminovVS/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/perminovVS/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/perminovVS/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/perminovVS/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/perminovVS/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/perminovVS/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/perminovVS/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/perminovVS/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/perminovVS/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/perminovVS/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/perminovVS/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/perminovVS/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/perminovVS/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/perminovVS/cocos2d-x/merges","archive_url":"https://api.github.com/repos/perminovVS/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/perminovVS/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/perminovVS/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/perminovVS/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/perminovVS/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/perminovVS/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/perminovVS/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/perminovVS/cocos2d-x/releases{/id}","deployments_url":"https://api.github.com/repos/perminovVS/cocos2d-x/deployments","created_at":"2015-03-16T14:25:20Z","updated_at":"2015-11-12T13:49:30Z","pushed_at":"2016-03-07T14:05:33Z","git_url":"git://github.com/perminovVS/cocos2d-x.git","ssh_url":"git@github.com:perminovVS/cocos2d-x.git","clone_url":"https://github.com/perminovVS/cocos2d-x.git","svn_url":"https://github.com/perminovVS/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":274475,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"v3"}},"base":{"label":"cocos2d:v3","ref":"v3","sha":"f2c999441aaa59cf93aa48910b386811d091f21f","user":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"repo":{"id":1093228,"name":"cocos2d-x","full_name":"cocos2d/cocos2d-x","owner":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos2d/cocos2d-x","description":"cocos2d-x for C++","fork":false,"url":"https://api.github.com/repos/cocos2d/cocos2d-x","forks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/forks","keys_url":"https://api.github.com/repos/cocos2d/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos2d/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos2d/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/events","assignees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/cocos2d/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos2d/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/cocos2d/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos2d/cocos2d-x/merges","archive_url":"https://api.github.com/repos/cocos2d/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos2d/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos2d/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/cocos2d/cocos2d-x/releases{/id}","deployments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/deployments","created_at":"2010-11-18T23:17:00Z","updated_at":"2016-03-08T02:46:41Z","pushed_at":"2016-03-08T00:34:39Z","git_url":"git://github.com/cocos2d/cocos2d-x.git","ssh_url":"git@github.com:cocos2d/cocos2d-x.git","clone_url":"https://github.com/cocos2d/cocos2d-x.git","svn_url":"https://github.com/cocos2d/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":1400193,"stargazers_count":7589,"watchers_count":7589,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5222,"mirror_url":null,"open_issues_count":1118,"forks":5222,"open_issues":1118,"watchers":7589,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/15195"},"issue":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15195"},"comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15195/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15195/commits"},"statuses":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/2a201a5c4eaa0802edcfce4da6fcd4cb0a86eafe"}}}}