{"id":22254077,"url":"https://github.com/teddy-van-jerry/string_evaluate","last_synced_at":"2025-07-28T05:33:00.434Z","repository":{"id":48862384,"uuid":"383169700","full_name":"Teddy-van-Jerry/String_Evaluate","owner":"Teddy-van-Jerry","description":"Use C++ to evaluate a string. Support complex numbers, function names and variables.","archived":false,"fork":false,"pushed_at":"2021-07-09T15:13:29.000Z","size":22,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T15:53:47.999Z","etag":null,"topics":["complex","complex-numbers","cpp","eval","evaluate","evaluation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Teddy-van-Jerry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-05T14:31:53.000Z","updated_at":"2024-06-01T14:27:02.000Z","dependencies_parsed_at":"2022-09-13T01:33:20.483Z","dependency_job_id":null,"html_url":"https://github.com/Teddy-van-Jerry/String_Evaluate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Teddy-van-Jerry/String_Evaluate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-van-Jerry%2FString_Evaluate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-van-Jerry%2FString_Evaluate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-van-Jerry%2FString_Evaluate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-van-Jerry%2FString_Evaluate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Teddy-van-Jerry","download_url":"https://codeload.github.com/Teddy-van-Jerry/String_Evaluate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-van-Jerry%2FString_Evaluate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267468389,"owners_count":24092334,"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-07-28T02:00:09.689Z","response_time":68,"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":["complex","complex-numbers","cpp","eval","evaluate","evaluation"],"created_at":"2024-12-03T07:22:05.355Z","updated_at":"2025-07-28T05:33:00.160Z","avatar_url":"https://github.com/Teddy-van-Jerry.png","language":"C++","readme":"# String Evaluate\nUse C++ to evaluate a string. Support complex numbers, function names and variables.\n\n## Call the evaluation function\n```cpp\nstring msg;\n// eval with variables 'x' and 'y'\ncout \u003c\u003c eval(\"log(-2) * i + 2 $x ^ ($y - 1)\", { \"x\", \"y\" }, { { 1, 2 }, { 3, 4 } }, \u0026msg) \u003c\u003c endl;\ncout \u003c\u003c eval(\"$x + $y\", { \"x\", \"y\" }, { { 1, 2 }, { 2, 3 } }) \u003c\u003c endl;\ncout \u003c\u003c eval(\"-arcsin(2 - i)\") \u003c\u003c endl;\n// Mismatch of brackets error example\ncout \u003c\u003c eval(\"3 * ( 2 + 3 ]\") \u003c\u003c endl;\n```\n\n- Variable Names are started with the symbol `$`.\n- `+`, `-`, `*`, `/`, `^` and normal maths function names are supported.\n- Imaginary unit can be `i`, `I`, `j` or `J`.\n- Brackets can be `()`, `[]` or `{}`.\n\n\u003e **Tips**: If you have expressions continuously only with difference in variable values, i.e. `num_list`, you can first call `to_postorder` and store the postorder `std::vector`. Each time, calling `eval_postorder` only can be more efficient.\n\n## Project Background\nThis project is the basis of the development of [Fractal Designer](https://github.com/Teddy-van-Jerry/Fractal_Designer) 6 and is already used in Fractal Designer 5.6. This project is the core of syntax analysis in Fractal Designer project.\n\n## Licence\n[MIT Licence](LICENSE)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddy-van-jerry%2Fstring_evaluate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteddy-van-jerry%2Fstring_evaluate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddy-van-jerry%2Fstring_evaluate/lists"}