{"action":"created","comment":{"url":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/comments/124249380","pull_request_review_id":46520547,"id":124249380,"diff_hunk":"@@ -30,6 +30,133 @@ import ocean.transition;\n \n import ocean.core.Traits;\n \n+import ocean.core.array.Search : find;\n+\n+import ocean.util.ReusableException;\n+\n+import ocean.math.Math;\n+\n+\n+/*******************************************************************************\n+\n+    Parses a floating point number represented as a string directly to an\n+    integer value.\n+\n+    To represent the fractional part we multiply the value by the requested\n+    amount of decimal points and add it up. For example:\n+\n+    \"1.123\" -> 1123  (decimal_points = 3)\n+    \"0.01\"  ->   10  (decimal_points = 3)\n+\n+    Any characters longer than the requested amount of decimal points will be\n+    cut off:\n+\n+    \"1.2345\"  ->  123 (decimal_points = 2)\n+    \"10.2030\" -> 1020 (decimal_points = 2)\n+\n+    Params:\n+        decimal_points = amount of decimal points to consider\n+        T              = type of the integer\n+        value          = floating point number string to parse\n+        exception      = optional, a reusable exception instance to throw\n+\n+    Returns:\n+        the resulting integer number\n+\n+*******************************************************************************/\n+\n+public T floatStringToInt ( size_t decimal_points, T = ulong )","path":"src/ocean/text/convert/Integer.d","position":39,"original_position":39,"commit_id":"b1b2f320fa5861a5ecf27e59d1d046a73606b988","original_commit_id":"b1b2f320fa5861a5ecf27e59d1d046a73606b988","user":{"login":"mathias-baumann-sociomantic","id":2702644,"avatar_url":"https://avatars1.githubusercontent.com/u/2702644?v=3","gravatar_id":"","url":"https://api.github.com/users/mathias-baumann-sociomantic","html_url":"https://github.com/mathias-baumann-sociomantic","followers_url":"https://api.github.com/users/mathias-baumann-sociomantic/followers","following_url":"https://api.github.com/users/mathias-baumann-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/mathias-baumann-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/mathias-baumann-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathias-baumann-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/mathias-baumann-sociomantic/orgs","repos_url":"https://api.github.com/users/mathias-baumann-sociomantic/repos","events_url":"https://api.github.com/users/mathias-baumann-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/mathias-baumann-sociomantic/received_events","type":"User","site_admin":false},"body":"Well, I figured it is a compile time optimization because that way the `pow()` line is also done at compile time and only the multiplication with the price needs to be done at runtime","created_at":"2017-06-27T11:40:41Z","updated_at":"2017-06-27T11:40:41Z","html_url":"https://github.com/sociomantic-tsunami/ocean/pull/169#discussion_r124249380","pull_request_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169","_links":{"self":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/comments/124249380"},"html":{"href":"https://github.com/sociomantic-tsunami/ocean/pull/169#discussion_r124249380"},"pull_request":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169"}}},"pull_request":{"url":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169","id":127503940,"html_url":"https://github.com/sociomantic-tsunami/ocean/pull/169","diff_url":"https://github.com/sociomantic-tsunami/ocean/pull/169.diff","patch_url":"https://github.com/sociomantic-tsunami/ocean/pull/169.patch","issue_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/issues/169","number":169,"state":"open","locked":false,"title":"Implement method to parse floating point strings to int","user":{"login":"mathias-baumann-sociomantic","id":2702644,"avatar_url":"https://avatars1.githubusercontent.com/u/2702644?v=3","gravatar_id":"","url":"https://api.github.com/users/mathias-baumann-sociomantic","html_url":"https://github.com/mathias-baumann-sociomantic","followers_url":"https://api.github.com/users/mathias-baumann-sociomantic/followers","following_url":"https://api.github.com/users/mathias-baumann-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/mathias-baumann-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/mathias-baumann-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathias-baumann-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/mathias-baumann-sociomantic/orgs","repos_url":"https://api.github.com/users/mathias-baumann-sociomantic/repos","events_url":"https://api.github.com/users/mathias-baumann-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/mathias-baumann-sociomantic/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-26T15:56:19Z","updated_at":"2017-06-27T11:40:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"919703d43b586dab45e0449846cf1e84a658fcdf","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169/commits","review_comments_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169/comments","review_comment_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/issues/169/comments","statuses_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/statuses/b1b2f320fa5861a5ecf27e59d1d046a73606b988","head":{"label":"mathias-baumann-sociomantic:floatStringToInt","ref":"floatStringToInt","sha":"b1b2f320fa5861a5ecf27e59d1d046a73606b988","user":{"login":"mathias-baumann-sociomantic","id":2702644,"avatar_url":"https://avatars1.githubusercontent.com/u/2702644?v=3","gravatar_id":"","url":"https://api.github.com/users/mathias-baumann-sociomantic","html_url":"https://github.com/mathias-baumann-sociomantic","followers_url":"https://api.github.com/users/mathias-baumann-sociomantic/followers","following_url":"https://api.github.com/users/mathias-baumann-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/mathias-baumann-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/mathias-baumann-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathias-baumann-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/mathias-baumann-sociomantic/orgs","repos_url":"https://api.github.com/users/mathias-baumann-sociomantic/repos","events_url":"https://api.github.com/users/mathias-baumann-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/mathias-baumann-sociomantic/received_events","type":"User","site_admin":false},"repo":{"id":92859343,"name":"ocean-1","full_name":"mathias-baumann-sociomantic/ocean-1","owner":{"login":"mathias-baumann-sociomantic","id":2702644,"avatar_url":"https://avatars1.githubusercontent.com/u/2702644?v=3","gravatar_id":"","url":"https://api.github.com/users/mathias-baumann-sociomantic","html_url":"https://github.com/mathias-baumann-sociomantic","followers_url":"https://api.github.com/users/mathias-baumann-sociomantic/followers","following_url":"https://api.github.com/users/mathias-baumann-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/mathias-baumann-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/mathias-baumann-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathias-baumann-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/mathias-baumann-sociomantic/orgs","repos_url":"https://api.github.com/users/mathias-baumann-sociomantic/repos","events_url":"https://api.github.com/users/mathias-baumann-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/mathias-baumann-sociomantic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mathias-baumann-sociomantic/ocean-1","description":"General purpose, platform-dependant, high-performance library for D","fork":true,"url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1","forks_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/forks","keys_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/teams","hooks_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/hooks","issue_events_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/issues/events{/number}","events_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/events","assignees_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/assignees{/user}","branches_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/branches{/branch}","tags_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/tags","blobs_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/statuses/{sha}","languages_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/languages","stargazers_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/stargazers","contributors_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/contributors","subscribers_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/subscribers","subscription_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/subscription","commits_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/contents/{+path}","compare_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/merges","archive_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/downloads","issues_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/issues{/number}","pulls_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/pulls{/number}","milestones_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/milestones{/number}","notifications_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/labels{/name}","releases_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/releases{/id}","deployments_url":"https://api.github.com/repos/mathias-baumann-sociomantic/ocean-1/deployments","created_at":"2017-05-30T17:36:46Z","updated_at":"2017-05-30T17:36:50Z","pushed_at":"2017-06-26T16:01:42Z","git_url":"git://github.com/mathias-baumann-sociomantic/ocean-1.git","ssh_url":"git@github.com:mathias-baumann-sociomantic/ocean-1.git","clone_url":"https://github.com/mathias-baumann-sociomantic/ocean-1.git","svn_url":"https://github.com/mathias-baumann-sociomantic/ocean-1","homepage":null,"size":2977,"stargazers_count":0,"watchers_count":0,"language":"D","has_issues":false,"has_projects":true,"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":0,"default_branch":"v2.x.x"}},"base":{"label":"sociomantic-tsunami:v3.x.x","ref":"v3.x.x","sha":"475ff6ea9a845a05ca50d803a46529ccfb0fe709","user":{"login":"sociomantic-tsunami","id":16766217,"avatar_url":"https://avatars3.githubusercontent.com/u/16766217?v=3","gravatar_id":"","url":"https://api.github.com/users/sociomantic-tsunami","html_url":"https://github.com/sociomantic-tsunami","followers_url":"https://api.github.com/users/sociomantic-tsunami/followers","following_url":"https://api.github.com/users/sociomantic-tsunami/following{/other_user}","gists_url":"https://api.github.com/users/sociomantic-tsunami/gists{/gist_id}","starred_url":"https://api.github.com/users/sociomantic-tsunami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sociomantic-tsunami/subscriptions","organizations_url":"https://api.github.com/users/sociomantic-tsunami/orgs","repos_url":"https://api.github.com/users/sociomantic-tsunami/repos","events_url":"https://api.github.com/users/sociomantic-tsunami/events{/privacy}","received_events_url":"https://api.github.com/users/sociomantic-tsunami/received_events","type":"Organization","site_admin":false},"repo":{"id":62304010,"name":"ocean","full_name":"sociomantic-tsunami/ocean","owner":{"login":"sociomantic-tsunami","id":16766217,"avatar_url":"https://avatars3.githubusercontent.com/u/16766217?v=3","gravatar_id":"","url":"https://api.github.com/users/sociomantic-tsunami","html_url":"https://github.com/sociomantic-tsunami","followers_url":"https://api.github.com/users/sociomantic-tsunami/followers","following_url":"https://api.github.com/users/sociomantic-tsunami/following{/other_user}","gists_url":"https://api.github.com/users/sociomantic-tsunami/gists{/gist_id}","starred_url":"https://api.github.com/users/sociomantic-tsunami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sociomantic-tsunami/subscriptions","organizations_url":"https://api.github.com/users/sociomantic-tsunami/orgs","repos_url":"https://api.github.com/users/sociomantic-tsunami/repos","events_url":"https://api.github.com/users/sociomantic-tsunami/events{/privacy}","received_events_url":"https://api.github.com/users/sociomantic-tsunami/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sociomantic-tsunami/ocean","description":"General purpose, platform-dependant, high-performance library for D","fork":false,"url":"https://api.github.com/repos/sociomantic-tsunami/ocean","forks_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/forks","keys_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/teams","hooks_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/hooks","issue_events_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/issues/events{/number}","events_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/events","assignees_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/assignees{/user}","branches_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/branches{/branch}","tags_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/tags","blobs_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/git/refs{/sha}","trees_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/statuses/{sha}","languages_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/languages","stargazers_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/stargazers","contributors_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/contributors","subscribers_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/subscribers","subscription_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/subscription","commits_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/commits{/sha}","git_commits_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/git/commits{/sha}","comments_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/comments{/number}","issue_comment_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/issues/comments{/number}","contents_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/contents/{+path}","compare_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/merges","archive_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/downloads","issues_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/issues{/number}","pulls_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls{/number}","milestones_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/milestones{/number}","notifications_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/labels{/name}","releases_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/releases{/id}","deployments_url":"https://api.github.com/repos/sociomantic-tsunami/ocean/deployments","created_at":"2016-06-30T11:01:55Z","updated_at":"2017-05-31T02:31:20Z","pushed_at":"2017-06-27T11:18:01Z","git_url":"git://github.com/sociomantic-tsunami/ocean.git","ssh_url":"git@github.com:sociomantic-tsunami/ocean.git","clone_url":"https://github.com/sociomantic-tsunami/ocean.git","svn_url":"https://github.com/sociomantic-tsunami/ocean","homepage":null,"size":3029,"stargazers_count":33,"watchers_count":33,"language":"D","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":33,"forks":26,"open_issues":33,"watchers":33,"default_branch":"v2.x.x"}},"_links":{"self":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169"},"html":{"href":"https://github.com/sociomantic-tsunami/ocean/pull/169"},"issue":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/issues/169"},"comments":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/sociomantic-tsunami/ocean/statuses/b1b2f320fa5861a5ecf27e59d1d046a73606b988"}}}}
{"actor":{"display_login":"mathias-baumann-sociomantic"}}