{"action":"created","issue":{"url":"https://api.github.com/repos/dlang/phobos/issues/4703","repository_url":"https://api.github.com/repos/dlang/phobos","labels_url":"https://api.github.com/repos/dlang/phobos/issues/4703/labels{/name}","comments_url":"https://api.github.com/repos/dlang/phobos/issues/4703/comments","events_url":"https://api.github.com/repos/dlang/phobos/issues/4703/events","html_url":"https://github.com/dlang/phobos/pull/4703","id":168882043,"number":4703,"title":"bit testing and setting functions","user":{"login":"burner","id":13327,"avatar_url":"https://avatars.githubusercontent.com/u/13327?v=3","gravatar_id":"","url":"https://api.github.com/users/burner","html_url":"https://github.com/burner","followers_url":"https://api.github.com/users/burner/followers","following_url":"https://api.github.com/users/burner/following{/other_user}","gists_url":"https://api.github.com/users/burner/gists{/gist_id}","starred_url":"https://api.github.com/users/burner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burner/subscriptions","organizations_url":"https://api.github.com/users/burner/orgs","repos_url":"https://api.github.com/users/burner/repos","events_url":"https://api.github.com/users/burner/events{/privacy}","received_events_url":"https://api.github.com/users/burner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dlang/phobos/labels/@andralex","name":"@andralex","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-02T13:15:16Z","updated_at":"2016-08-02T18:03:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dlang/phobos/pulls/4703","html_url":"https://github.com/dlang/phobos/pull/4703","diff_url":"https://github.com/dlang/phobos/pull/4703.diff","patch_url":"https://github.com/dlang/phobos/pull/4703.patch"},"body":"Bit Testing Functions\r\n---------------------\r\n```d\r\nbool testBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);\r\n\r\nbool testAnyBit(T)(const T bitfield) if(isIntegral!T);\r\n\r\nbool testNoBit(T)(const T bitfield) if(isIntegral!T);\r\n\r\nbool testAllBit(T)(const T bitfield) if(isIntegral!T);\r\n```\r\n\r\nBit Setting Functions\r\n---------------------\r\n```d\r\nT setBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);\r\n\r\nT setBit(T)(const T bitfield, const ulong idx, bool value) if(isIntegral!T);\r\n\r\nT flipBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);\r\n\r\nT resetBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);\r\n```\r\n\r\nBit Pretty Printing\r\n----------------------------\r\n```d\r\nvoid bitsPrettyPrint(T,Out)(const T value, ref Out output)\r\n\tif (isIntegral!T && isOutputRange!(Out,string));\r\n\r\nstring bitsPrettyPrint(T)(const T value) if (isIntegral!T);\r\n\r\n```\r\n\r\ngithub: https://github.com/burner/BitFiddle\r\ndub: http://code.dlang.org/packages/bitfiddle"},"comment":{"url":"https://api.github.com/repos/dlang/phobos/issues/comments/236989477","html_url":"https://github.com/dlang/phobos/pull/4703#issuecomment-236989477","issue_url":"https://api.github.com/repos/dlang/phobos/issues/4703","id":236989477,"user":{"login":"burner","id":13327,"avatar_url":"https://avatars.githubusercontent.com/u/13327?v=3","gravatar_id":"","url":"https://api.github.com/users/burner","html_url":"https://github.com/burner","followers_url":"https://api.github.com/users/burner/followers","following_url":"https://api.github.com/users/burner/following{/other_user}","gists_url":"https://api.github.com/users/burner/gists{/gist_id}","starred_url":"https://api.github.com/users/burner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burner/subscriptions","organizations_url":"https://api.github.com/users/burner/orgs","repos_url":"https://api.github.com/users/burner/repos","events_url":"https://api.github.com/users/burner/events{/privacy}","received_events_url":"https://api.github.com/users/burner/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T18:03:24Z","updated_at":"2016-08-02T18:03:24Z","body":"@klickverbot it inserts the right casts at the right spots so you don't have to remember that byte become ints when you bitwise (or|and) them. of cause some people know, but calling one of those functions is way easier."}}
{"actor":{"display_login":"burner"}}