Skip to content

Conversation

@davidbuzatto
Copy link
Contributor

I've created an example using the majority of the strings management funcions:

  • int TextCopy(char *dst, const char *src);
  • unsigned int TextLength(const char *text);
  • const char *TextFormat(const char *text, ...);
  • const char *TextSubtext(const char *text, int position, int length);
  • const char **TextSplit(const char *text, char delimiter, int *count);
  • const char *TextToUpper(const char *text);
  • const char *TextToLower(const char *text);
  • const char *TextToPascal(const char *text);
  • const char *TextToSnake(const char *text);
  • const char *TextToCamel(const char *text);
strings-management.webm

@raysan5
Copy link
Owner

raysan5 commented Dec 2, 2025

@davidbuzatto Example is a bit longer than expected but it looks nice. Please, could you review code structure to follow same structure as reviewed in the preevious one? --> d3addad

@raysan5 raysan5 changed the title New example for strings management [examples] Added: text_strings_management Dec 2, 2025
@davidbuzatto
Copy link
Contributor Author

@davidbuzatto Example is a bit longer than expected but it looks nice. Please, could you review code structure to follow same structure as reviewed in the preevious one? --> d3addad

Done! I fixed some bugs and made some improvements. Yes, unfortunately the example ended up being quite large 😢

@raysan5 raysan5 merged commit b1f8cde into raysan5:master Dec 3, 2025
17 checks passed
@raysan5
Copy link
Owner

raysan5 commented Dec 3, 2025

@davidbuzatto thanks for the review! merged!

I'm reviewing shapes_penrose_tile example and it's very difficult to understand, specially for users with not much coding experience. It would be nice to include some comments and explanations about how things work, that's the pourpose of the examples, to be like small tutorials, otherwise, many users will just look at its beautiful output but will not spend time trying to understand the code. I usually add a comment for every function added, beside the descriptive naming, and also comment the fields of added structurs. I try to avoid shortening variable names like pos or vel, in raylib I prefer position and speed/velocity.

@davidbuzatto
Copy link
Contributor Author

@davidbuzatto thanks for the review! merged!

I'm reviewing shapes_penrose_tile example and it's very difficult to understand, specially for users with not much coding experience. It would be nice to include some comments and explanations about how things work, that's the pourpose of the examples, to be like small tutorials, otherwise, many users will just look at its beautiful output but will not spend time trying to understand the code. I usually add a comment for every function added, beside the descriptive naming, and also comment the fields of added structurs. I try to avoid shortening variable names like pos or vel, in raylib I prefer position and speed/velocity.

If you want, I can do that, you can count on me. The problem was that I was afraid of adding too much text in the form of comments in the code and exceeding the recommended number of lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants