{"id":18736853,"url":"https://github.com/bitwizeshift/string_view-standalone","last_synced_at":"2025-04-12T19:32:03.671Z","repository":{"id":46245653,"uuid":"67557251","full_name":"bitwizeshift/string_view-standalone","owner":"bitwizeshift","description":"A custom implementation of the C++17 'string_view' back-ported to c++11","archived":false,"fork":false,"pushed_at":"2021-11-10T12:34:52.000Z","size":176,"stargazers_count":42,"open_issues_count":0,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-26T14:01:43.121Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bitwizeshift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["bitwizeshift"],"custom":"https://www.buymeacoffee.com/dsq3XCcBE"}},"created_at":"2016-09-07T00:29:27.000Z","updated_at":"2024-11-07T11:51:36.000Z","dependencies_parsed_at":"2022-09-25T05:10:58.791Z","dependency_job_id":null,"html_url":"https://github.com/bitwizeshift/string_view-standalone","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwizeshift%2Fstring_view-standalone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwizeshift%2Fstring_view-standalone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwizeshift%2Fstring_view-standalone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwizeshift%2Fstring_view-standalone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitwizeshift","download_url":"https://codeload.github.com/bitwizeshift/string_view-standalone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248621212,"owners_count":21134776,"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-11-07T15:22:44.387Z","updated_at":"2025-04-12T19:32:03.417Z","avatar_url":"https://github.com/bitwizeshift.png","language":"C++","funding_links":["https://github.com/sponsors/bitwizeshift","https://www.buymeacoffee.com/dsq3XCcBE"],"categories":[],"sub_categories":[],"readme":"# `string_view` Standalone\n\n[![Ubuntu Build Status](https://github.com/bitwizeshift/string_view-standalone/workflows/Ubuntu/badge.svg?branch=master)](https://github.com/bitwizeshift/string_view-standalone/actions?query=workflow%3AUbuntu)\n[![macOS Build Status](https://github.com/bitwizeshift/string_view-standalone/workflows/macOS/badge.svg?branch=master)](https://github.com/bitwizeshift/string_view-standalone/actions?query=workflow%3AmacOS)\n[![Windows Build Status](https://github.com/bitwizeshift/string_view-standalone/workflows/Windows/badge.svg?branch=master)](https://github.com/bitwizeshift/string_view-standalone/actions?query=workflow%3AWindows)\n[![Coverage Status](https://coveralls.io/repos/github/bitwizeshift/string_view-standalone/badge.svg?branch=master)](https://coveralls.io/github/bitwizeshift/string_view-standalone?branch=master)\n[![Github Issues](https://img.shields.io/github/issues/bitwizeshift/string_view-standalone.svg)](http://github.com/bitwizeshift/string_view-standalone/issues)\n\u003cbr/\u003e\n[![Github Releases](https://img.shields.io/github/release/bitwizeshift/string_view-standalone.svg)](https://github.com/bitwizeshift/string_view-standalone/releases)\n[![Tested Compilers](https://img.shields.io/badge/compilers-gcc%20%7C%20clang-blue.svg)](#tested-compilers)\n[![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](http://bitwizeshift.github.io/string_view-standalone)\n[![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/bitwizeshift/string_view-standalone/master/LICENSE.md)\n\n## What is `string_view` Standalone?\n\nC++17 introduced lightweight, non-owning strings referred to as `string_view` to the standard. Unlike `std::string`, which performs memory allocations\nand copies for most string operations (such as `substr`), the `string_view` only observes and does not modify the entry.\nThis can massively decrease the memory footprint and provide a large optimization for immutable strings for things like parsing and tokenization. As a\nresult, such a type can be an asset in older c++ versions for systems that may not support the newer standards.\n\nThe full type, `basic_string_view` is templated on a both `CharT` and `Traits` to allow viewing of contiguous char-like sequences of data, and for\nsimple conversion between `std::basic_string` and `basic_string_view`.\n\n----------------------------\n\nThis `string_view` implementation is from the [**BackportCpp**](https://github.com/bitwizeshift/BackportCpp) library, which aims to\nbackport library types and utilities from C++14, C++17, and C++20 to be compatible with C++11 compilers. This standalone \nlibrary simply offers a subset for those looking for a simple drop-in `string_view` implementation.\n\n## Rationale\n\nC++17 is still undergoing the standardization process (although currently is considered 'feature-complete'). Although non-owning strings are available in\nmany other libraries, such as boost, Bloomberg STD, QT -- all of them come with rather large dependencies and have slightly different functionality and\nsignatures.\n\nBy releasing this library as a standalone include, it provides future-proof support to older compilers with easy accessibility.\nIt also allows using the newer feature-set in older versions, and facilitates easy upgrades to the new standard as compilers upgrade and newer\nc++ versions become available.\n\n## Tested Compilers\n\nThe following compilers are currently being tested through continuous integration with [Travis](https://travis-ci.org/bitwizeshift/string_view-standalone).\n\nNote that `bpstd::string_view` only works on compiler that provide proper conformance for c++11, meaning this\ndoes not properly work on g++ before 4.8\n\n| Compiler              | Operating System                   |\n|-----------------------|------------------------------------|\n| g++ 4.9.3             | Ubuntu 14.04.3 TLS                 |\n| g++ 5.3.0             | Ubuntu 14.04.3 TLS                 |\n| g++ 6.1.1             | Ubuntu 14.04.3 TLS                 |\n| clang 3.5.0           | Ubuntu 14.04.3 TLS                 |\n| clang 3.6.2           | Ubuntu 14.04.3 TLS                 |\n| clang 3.8.0           | Ubuntu 14.04.3 TLS                 |\n| clang xcode 6.0       | Darwin Kernel 13.4.0 (OSX 10.9.5)  |\n| clang xcode 6.1       | Darwin Kernel 14.3.0 (OSX 10.10.3) |\n| clang xcode 7.0       | Darwin Kernel 14.5.0 (OSX 10.10.5) |\n| clang xcode 7.3       | Darwin Kernel 15.5.0 (OSX 10.11.5) |\n| clang xcode 8.0       | Darwin Kernel 15.6.0 (OSX 10.11.6) |\n| Visual Studio 14 2015\t| Windows Server 2012 R2 (x64)       |\n\n## License\n\n\u003cimg align=\"right\" src=\"http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png\"\u003e\n\nThe class is licensed under the [MIT License](http://opensource.org/licenses/MIT):\n\n\u003e Copyright \u0026copy; 2016-2021 [Matthew Rodusek](http://bitwizeshift.github.com/)\n\u003e\n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\n\u003e of this software and associated documentation files (the \"Software\"), to deal\n\u003e in the Software without restriction, including without limitation the rights\n\u003e to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\u003e copies of the Software, and to permit persons to whom the Software is\n\u003e furnished to do so, subject to the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be included in all\n\u003e copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\u003e IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\u003e FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\u003e AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\u003e LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\u003e OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\u003e SOFTWARE.\n\n## References\n\n- [`basic_string_view` on cpp-reference](http://en.cppreference.com/w/cpp/string/basic_string_view)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwizeshift%2Fstring_view-standalone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitwizeshift%2Fstring_view-standalone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwizeshift%2Fstring_view-standalone/lists"}