public: reimplement COM_TrimSpace, add it to crtlib, add tests for it

This commit is contained in:
Alibek Omarov
2026-02-28 00:05:35 +05:00
parent 62c547570a
commit 9a285986c4
7 changed files with 58 additions and 51 deletions

View File

@@ -103,6 +103,7 @@ const char *COM_FileWithoutPath( const char *in );
void COM_StripExtension( char *path );
void COM_RemoveLineFeed( char *str, size_t bufsize );
void COM_PathSlashFix( char *path );
void COM_TrimSpace( char *dst, const char *src, size_t size );
// returns true on empty or NULL string, false otherwise
#define COM_StringEmpty( string ) (( string )[0] ? false : true )