{"id":16521947,"url":"https://github.com/meshula/labtext","last_synced_at":"2025-10-28T08:30:18.149Z","repository":{"id":9114738,"uuid":"10898567","full_name":"meshula/LabText","owner":"meshula","description":"A bunch of text processing code","archived":false,"fork":false,"pushed_at":"2023-10-03T06:47:37.000Z","size":87,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-01T12:51:12.472Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meshula.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}},"created_at":"2013-06-24T04:21:13.000Z","updated_at":"2023-04-05T16:48:57.000Z","dependencies_parsed_at":"2022-08-29T02:01:21.104Z","dependency_job_id":null,"html_url":"https://github.com/meshula/LabText","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/meshula%2FLabText","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabText/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabText/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabText/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meshula","download_url":"https://codeload.github.com/meshula/LabText/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238614706,"owners_count":19501507,"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-11T16:58:44.425Z","updated_at":"2025-10-28T08:30:17.708Z","avatar_url":"https://github.com/meshula.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nLabText.h is now a single file text parsing utility.\n\nTo use LabText.h, include it in your project, and include it at once defining\nLABTEXT_ODR to cause the functions to be compiled into your program.\n\nThere are two interfaces to LabText; the old char* oriented version, and a new\ninterface based around a StrView struct. The char* interfaces are deprecated and\nwill be removed.\n\nStrView is extremely simple, and has no std dependencies or affordances. The\nsole purpose of StrView is to represent a non-owning view on a buffer of char.\n\n```cpp\nstruct StrView\n{\n    char const* curr;\n    size_t sz;\n\n    bool operator==(StrView const\u0026 rhs) const\n    {\n        return sz == rhs.sz \u0026\u0026 !strncmp(curr, rhs.curr, sz);\n    }\n    bool operator!=(StrView const\u0026 rhs) const\n    {\n        return !(*this == rhs);\n    }\n};\n```\n\nThere are several utilities available for StrView. In general, they take a\nStrView, and return a new StrView of remaining unprocessed input.\n\nThe functions are listed here, and documented only if non-obvious, or if the\nreturn is not a StrView of remaining unprocessed input.\n\nWS, where it appears, is an abbreviation for Whitespace.\n\nAlphanumeric refers to letters and numbers.\n\n```cpp\nbool IsEmpty(StrView const\u0026 s);\nStrView GetToken(StrView s, char delim, StrView\u0026 result);\nStrView GetTokenWSDelimited(StrView s, char delim, StrView\u0026 result);\nStrView GetTokenAlphaNumeric(StrView s, StrView\u0026 result);\nStrView GetTokenAlphaNumericExt(StrView s, char const* additional_characters, StrView\u0026 result);\nStrView GetString(StrView s, bool recognizeEscapes, StrView\u0026 result);\nStrView GetInt16(StrView s, int16_t\u0026 result);\nStrView GetInt32(StrView s, int32_t\u0026 result);\nStrView GetUInt32(StrView s, uint32_t\u0026 result);\nStrView GetHex(StrView s, uint32_t\u0026 result);\nStrView GetFloat(StrView s, float\u0026 result);\nStrView ScanForCharacter(StrView s, char delim);\nStrView ScanBackwardsForCharacter(StrView s, char delim);\nStrView ScanForWhiteSpace(StrView s);\nStrView ScanBackwardsForWhiteSpace(StrView s);\nStrView ScanForNonWhiteSpace(StrView s);\nStrView ScanForTrailingNonWhiteSpace(StrView s);\nStrView ScanForEndOfLine(StrView s);\nStrView ScanForEndOfLine(StrView s, StrView\u0026 skipped);\nStrView ScanForLastCharacterOnLine(StrView s);\nStrView ScanForBeginningOfNextLine(StrView s);\nStrView ScanPastCPPComments(StrView s);\nStrView SkipCommentsAndWhitespace(StrView s);\nStrView Expect(StrView s, StrView expect); // if expect not found return equals s\nStrView Strip(StrView s); // strips leading and trailing whitespace\nstd::vector\u003cStrView\u003e Split(StrView s, char split);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Flabtext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeshula%2Flabtext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Flabtext/lists"}