{"id":19112366,"url":"https://github.com/mtlh/censored-strings","last_synced_at":"2026-01-29T18:50:56.012Z","repository":{"id":143452149,"uuid":"289869862","full_name":"mtlh/censored-strings","owner":"mtlh","description":"https://edabit.com/challenge/Wv9ZeXyC32EMfRWGB My solution in various languages to this problem.","archived":false,"fork":false,"pushed_at":"2021-01-27T10:45:03.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-03T04:47:03.831Z","etag":null,"topics":["censored-words","coding-challenge","language-processing"],"latest_commit_sha":null,"homepage":"https://edabit.com/challenge/Wv9ZeXyC32EMfRWGB","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/mtlh.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":"2020-08-24T08:22:48.000Z","updated_at":"2021-01-27T10:45:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"c12de85e-2be3-435f-addb-144b4ebc1de0","html_url":"https://github.com/mtlh/censored-strings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtlh%2Fcensored-strings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtlh%2Fcensored-strings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtlh%2Fcensored-strings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtlh%2Fcensored-strings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtlh","download_url":"https://codeload.github.com/mtlh/censored-strings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170070,"owners_count":19759140,"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","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":["censored-words","coding-challenge","language-processing"],"created_at":"2024-11-09T04:32:51.755Z","updated_at":"2026-01-29T18:50:50.990Z","avatar_url":"https://github.com/mtlh.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Censored Strings Challenge\nhttps://edabit.com/challenge/Wv9ZeXyC32EMfRWGB My solution in various languages to this problem.\n\n\n## C++:\n\nstd::string uncensor(std::string str, std::string vowels) {\n\tstd::string res = \"\";\n\tint cur = 0;\n\tfor(int i = 0; i \u003c str.size(); i++) {\n\t\tif(str[i] == '*') {\n\t\t\tres += vowels[cur];\n\t\t\tcur++;\n\t\t}\n\t\telse {\n\t\t\tres+= str[i];\n\t\t}\t\t\n\t}\n\treturn res;\n}\n\n\n## Python:\n\ndef uncensor(txt, vowels):\n    listTxt = list(txt)\n    listVowels = list(vowels)\n    vowelsCounter = 0\n    for x in range(len(listTxt)):\n        if listTxt[x] == \"*\":\n            listTxt[x] = listVowels[vowelsCounter]\n            vowelsCounter += 1\n\n    result = \"\"\n    for x in listTxt:\n        result += x\n    \n    return result\n\n\n## JavaScript:\n\nfunction uncensor(str, vowels) {\n\tvar newString = ''\n\tvar vowelsCounter = 0\n\tfor(var i = 0; i \u003c str.length; i ++){\n\t\tif(str.charAt(i)==='*'){\n\t\t\tnewString += vowels[vowelsCounter]\n\t\t\tvowelsCounter++\n\t\t}\n\t\telse{\n\t\t\tnewString += str.charAt(i)\n\t\t}\n\t}\n\treturn newString\n}\n\n\n## Java:\n\npublic class Challenge {\n\tpublic static String uncensor(String str, String vowels) {\n\t\tString uncensored = \"\";\n\t\tint vowelCounter = 0;\n\t\tfor (int i = 0; i \u003c str.length(); i++) {\n\t\t\tuncensored += (str.charAt(i) != '*' ? str.charAt(i) : vowels.charAt(vowelCounter++));\n\t\t}\n\t\treturn uncensored;\n\t}\n}\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtlh%2Fcensored-strings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtlh%2Fcensored-strings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtlh%2Fcensored-strings/lists"}