Is there any function like TrimStart C# in C? (delete the first apparition of space in a string) or some way to use it in C?

Unfortunately there isn't. But it's easy to write yourself. Just search the string for the first non white-space characterr (space, tab, newline) and, when found, shift all remaining characters to the beginning of the buffer so that all white-space characters are overwritten. memmove() is a good function to shift everything all at once.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.