{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/9345","repository_url":"https://api.github.com/repos/xbmc/xbmc","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/9345/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/9345/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/9345/events","html_url":"https://github.com/xbmc/xbmc/pull/9345","id":140516827,"number":9345,"title":"[gui] refactor string and integer comparison boolean conditions","user":{"login":"xhaggi","id":1878991,"avatar_url":"https://avatars.githubusercontent.com/u/1878991?v=3","gravatar_id":"","url":"https://api.github.com/users/xhaggi","html_url":"https://github.com/xhaggi","followers_url":"https://api.github.com/users/xhaggi/followers","following_url":"https://api.github.com/users/xhaggi/following{/other_user}","gists_url":"https://api.github.com/users/xhaggi/gists{/gist_id}","starred_url":"https://api.github.com/users/xhaggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xhaggi/subscriptions","organizations_url":"https://api.github.com/users/xhaggi/orgs","repos_url":"https://api.github.com/users/xhaggi/repos","events_url":"https://api.github.com/users/xhaggi/events{/privacy}","received_events_url":"https://api.github.com/users/xhaggi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xbmc/xbmc/labels/GUI%20Engine","name":"GUI Engine","color":"009800"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Wiki-Needed","name":"Wiki-Needed","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2016-03-13T19:12:13Z","updated_at":"2016-03-13T22:44:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/9345","html_url":"https://github.com/xbmc/xbmc/pull/9345","diff_url":"https://github.com/xbmc/xbmc/pull/9345.diff","patch_url":"https://github.com/xbmc/xbmc/pull/9345.patch"},"body":"This PR refactors the handling of our boolean conditions for strings and integers. It adds two new namespaces `String` and `Integer` to separate them like we do on other boolean conditions. I'm leaving the old boolean conditions in for backward compatibility reason but mark them as deprecated.\r\n\r\n**New boolean conditions for strings**\r\n```\r\nString.IsEmpty(str)\r\nString.IsEqual(str1,str2)\r\nString.StartsWith(str,substring)\r\nString.EndsWith(str,substring)\r\nString.Contains(str,substring)\r\n```\r\n\r\n**New boolean conditions for integers**\r\n```\r\nInteger.IsEqual(argument,integer)\r\nInteger.IsGreater(argument,integer)\r\nInteger.IsGreaterOrEqual(argument,integer)\r\nInteger.IsLess(argument,integer)\r\nInteger.IsLessOrEqual(argument,integer)\r\n```\r\n@phil65 @ronie @BigNoid @HitcherUK\r\n@tamland for a review of the code part, thank you again already ;)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/196074379","html_url":"https://github.com/xbmc/xbmc/pull/9345#issuecomment-196074379","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/9345","id":196074379,"user":{"login":"xhaggi","id":1878991,"avatar_url":"https://avatars.githubusercontent.com/u/1878991?v=3","gravatar_id":"","url":"https://api.github.com/users/xhaggi","html_url":"https://github.com/xhaggi","followers_url":"https://api.github.com/users/xhaggi/followers","following_url":"https://api.github.com/users/xhaggi/following{/other_user}","gists_url":"https://api.github.com/users/xhaggi/gists{/gist_id}","starred_url":"https://api.github.com/users/xhaggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xhaggi/subscriptions","organizations_url":"https://api.github.com/users/xhaggi/orgs","repos_url":"https://api.github.com/users/xhaggi/repos","events_url":"https://api.github.com/users/xhaggi/events{/privacy}","received_events_url":"https://api.github.com/users/xhaggi/received_events","type":"User","site_admin":false},"created_at":"2016-03-13T22:44:44Z","updated_at":"2016-03-13T22:44:44Z","body":"> Personally I'd leave the s unless you go with ..OrEqualTo but other than that this is most welcome.\r\n\r\nWe dropped the `s` for `IsEqual` too, `IsGreaterOrEqual` sounds right and used by different language libs i see so far."}}