libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Files | |
file | gimbal_strings.h |
file | gimbal_pattern.h |
file | gimbal_pattern.hpp |
file | gimbal_quark.h |
file | gimbal_quark.hpp |
file | gimbal_string.h |
file | gimbal_string_buffer.h |
file | gimbal_string_list.h |
file | gimbal_string_ref.h |
file | gimbal_string_view.h |
file | gimbal_string_view.hpp |
Data Structures | |
class | gbl::Pattern |
class | gbl::Quark |
struct | GblStringBuffer |
struct | GblStringView |
struct | gbl::StringView |
struct | GblPattern |
Typedefs | |
typedef uintptr_t | GblQuark |
typedef GblRingList | GblStringList |
typedef const char | GblStringRef |
Collection of specialized string types.
LibGimbal provides a rich set of string manipulation functions with API functionality taken from various languages such as C++ and Java.
Rather than create a single string type and API that is general-purpose and only "decent" at everything (such as C++'s std::string and most equivalents), libGimbal has taken the approach of creating various different string types, with each optimized for a particular use-case.
For a little bit of extra complexity, this has the added benefits of allowing for custom-tailored APIs that are well suited for such individual use-cases in addition to the performance benefit. If you're using libGimbal with a higher-level langauge such as C++ or Rust, you also gain more than just another generic string type which is already builtin to your language of choice.
The following table can be referenced when deciding which string type to use:
Type | Use-cases | Header |
---|---|---|
GblStringView | Reading or immutable data processing | gimbal_string_view.h |
GblStringBuffer | Writing or mutable data processing and building | gimbal_string_buffer.h |
GblStringRef | Storing or managing ownership | gimbal_string_ref.h |
GblQuark | Hashing or uniquely identifying | gimbal_quark.h |
typedef uintptr_t GblQuark |
#include <gimbal_quark.h>
Uniquely identifiable interned string type.
Two quarks may be directly compared to one another for equality.
Definition at line 67 of file gimbal_quark.h.
typedef GblRingList GblStringList |
#include <gimbal_string_list.h>
List of strings with array-like API.
GblStringList is a dynamically resizable list of immutable strings. It is implemented as a GblRingBuffer where each entry is a GblStringRef.
Definition at line 80 of file gimbal_string_list.h.
typedef const char GblStringRef |
#include <gimbal_string_ref.h>
Reference-counted, const char*-compatible string type.
GblStringRef is a const char*-compatible reference-counted, read-only string type allowing for the sharing of a single string allocation between multiple different locations.
Definition at line 61 of file gimbal_string_ref.h.