We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a demo, vs2017 is ok.
` #define GB_IMPLEMENTATION #include "gb.h" #include <stdio.h>
int main(int argc, char **argv) { gbAllocator allocator = gb_heap_allocator(); gbString str = gb_string_make(allocator ,"Hello");
gbString other_str = gb_string_make_length(allocator,", ", 2); str = gb_string_append(str, other_str); str = gb_string_appendc(str, "world!"); gb_printf("%s\n", str); // Hello, world! gb_printf("str length = %d\n", gb_string_length(str)); str = gb_string_set(str, "Potato soup"); gb_printf("%s\n", str); // Potato soup str = gb_string_set(str, "Hello"); other_str = gb_string_set(other_str, "Pizza"); if (gb_string_are_equal(str, other_str)) gb_printf("Not called\n"); else gb_printf("Called\n"); str = gb_string_set(str, "Ab.;!...AHello World ??"); str = gb_string_trim(str, "Ab.;!. ?"); gb_printf("%s\n", str); // "Hello World" gb_string_free(str); gb_string_free(other_str); return 0;
} `
The text was updated successfully, but these errors were encountered:
Please make a PR to change this 😄
Sorry, something went wrong.
No branches or pull requests
This is a demo, vs2017 is ok.
`
#define GB_IMPLEMENTATION
#include "gb.h"
#include <stdio.h>
int main(int argc, char **argv)
{
gbAllocator allocator = gb_heap_allocator();
gbString str = gb_string_make(allocator ,"Hello");
}
`
The text was updated successfully, but these errors were encountered: