{"id":18459178,"url":"https://github.com/smartbear/string-calculator-exercise","last_synced_at":"2025-08-25T07:32:44.558Z","repository":{"id":222674247,"uuid":"758062301","full_name":"SmartBear/string-calculator-exercise","owner":"SmartBear","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-16T14:26:38.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-23T17:59:58.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SmartBear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-15T14:51:46.000Z","updated_at":"2024-02-15T14:51:47.000Z","dependencies_parsed_at":"2024-02-15T16:28:19.693Z","dependency_job_id":"f19885e9-3c39-492e-8e47-989dff64817f","html_url":"https://github.com/SmartBear/string-calculator-exercise","commit_stats":null,"previous_names":["smartbear/string-calculator-exercise"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SmartBear/string-calculator-exercise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Fstring-calculator-exercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Fstring-calculator-exercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Fstring-calculator-exercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Fstring-calculator-exercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SmartBear","download_url":"https://codeload.github.com/SmartBear/string-calculator-exercise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartBear%2Fstring-calculator-exercise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272024536,"owners_count":24860528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T08:22:08.626Z","updated_at":"2025-08-25T07:32:44.518Z","avatar_url":"https://github.com/SmartBear.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Please fork this repository to do the exercise 🙂\n\n# String calculator\n\nCreate a simple calculator that takes a String and returns a integer\n\nSignature (pseudo code):\n\n```java\nint Add(string numbers)\n```\n\n## Requirements\n1.  The method can take up to two numbers, separated by commas, and will return their sum as a result. So the inputs can be: “”, “1”, “1,2”. For an empty string, it will return 0.\n2.  Allow the add method to handle an unknown number of arguments\n3.  Allow the add method to handle newlines as separators, instead of comas\n\n    “1,2\\n3” should return “6”\n    “2,\\n3” is invalid, but no need to clarify it with the program\n\n4.  Add validation to not to allow a separator at the end\n\n    For example “1,2,” should return an error (or throw an exception)\n\n5.  Allow the add method to handle different delimiters\n\n    To change the delimiter, the beginning of the input will contain a separate line that looks like this:\n\n    `//[delimiter]\\n[numbers]`\n\n    - “//;\\n1;3” should return “4”\n    - “//|\\n1|2|3” should return “6”\n    - “//sep\\n2sep5” should return “7”\n    - “//|\\n1|2,3” is invalid and should return an error (or throw an exception) with the message “‘|’ expected but ‘,’ found at position 3.”\n\n6.  Calling add with negative numbers will return the message “Negative number(s) not allowed: \u003cnegativeNumbers\u003e”\n\n    “1,-2” is invalid and should return the message “Negative number(s) not allowed: -2”\n    “2,-4,-9” is invalid and should return the message “Negative number(s) not allowed: -4, -9”\n\n7.  Calling add with multiple errors will return all error messages separated by newlines.\n\n    “//|\\n1|2,-3” is invalid and return the message “Negative number(s) not allowed: -3\\n’|’ expected but ‘,’ found at position 3.”\n\n8.  Numbers bigger than 1000 should be ignored, so adding 2 + 1001 = 2\n\n\n## What we are going to look at\n\n1.  Code is tested\n2.  Code is clean and readable\n3.  Commits are small\n4.  Calculator works as intended\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartbear%2Fstring-calculator-exercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartbear%2Fstring-calculator-exercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartbear%2Fstring-calculator-exercise/lists"}