{"id":16746958,"url":"https://github.com/selfup/stringer","last_synced_at":"2025-03-16T02:21:27.579Z","repository":{"id":57668808,"uuid":"59925221","full_name":"selfup/stringer","owner":"selfup","description":"An easy way to turn unsafe CStrings into Rust String types and back.","archived":false,"fork":false,"pushed_at":"2016-07-05T02:23:11.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T06:20:12.911Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/stringer","language":"Rust","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/selfup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-29T03:51:30.000Z","updated_at":"2018-08-02T14:11:25.000Z","dependencies_parsed_at":"2022-08-27T03:50:38.359Z","dependency_job_id":null,"html_url":"https://github.com/selfup/stringer","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/selfup%2Fstringer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fstringer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fstringer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfup%2Fstringer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selfup","download_url":"https://codeload.github.com/selfup/stringer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814919,"owners_count":20352067,"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":[],"created_at":"2024-10-13T02:08:45.674Z","updated_at":"2025-03-16T02:21:27.310Z","avatar_url":"https://github.com/selfup.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stringer\n\nAn easy way to turn an unsafe `*const c_char` into a Rust String type and return a pointer for FFI.\n\n## Functions\n\n### turn_into_pointer\n```rust\nturn_into_pointer(string: String)  -\u003e CString\n```\nTakes a Rust String type and returns a CString.\n#\n### make_string\n```rust\nmake_string(unsafe_string: *const c_char) -\u003e String\n```\nTakes a `*const c_char` and returns a Rust `String` type.\n#\n### Example on how to load this into your project:\n\n**Cargo.toml**\n\n```rust\n[dependencies]\nstringer = \"0.1.6\"\n```\n\n**In the file you need the functions**\n\n```rust\nextern crate stringer;\nuse stringer::*;\n```\n### Things to consider\n\nDue to the nature of what this library is doing:\n\n* This code is unsafe\n* Use at your own risk","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Fstringer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselfup%2Fstringer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfup%2Fstringer/lists"}