Added space stripping during for content of various ASTs

* Typedef/Typename
* Function Names
* Pragmas
* Attributes
This commit is contained in:
2023-08-26 11:55:05 -04:00
parent abf51e4aa9
commit 7249a7317d
6 changed files with 126 additions and 17 deletions

View File

@ -213,6 +213,27 @@ struct String
#undef current
}
void strip_space()
{
char* write_pos = Data;
char* read_pos = Data;
while ( * read_pos)
{
if ( ! char_is_space( *read_pos ))
{
*write_pos = *read_pos;
write_pos++;
}
read_pos++;
}
write_pos[0] = '\0'; // Null-terminate the modified string
// Update the length if needed
get_header().Length = write_pos - Data;
}
void trim( char const* cut_set )
{
sw len = 0;