TrimRight

Description Removes the specific trailing characters from a string.
Syntax char *TrimRight( char *pszSource, char removeChar );
Arguments
char *pszSource
The source input string where the trailing characters need be be remove from.
char removeChar
The specific key that is used to remove from the source input string.
Returns A pointer to the changed source input string.
Remarks The source input string is changed by this function.
Example
#include <stdio.h>
#include "lib.h"
#include "input.h"     //Holds the input functions
#include "strfunc.h"   //Holds the string manipulation functions

void main( void )
{
    static char dummy[ 21 ];
    
    for(;;)
    {
        strcpy( dummy, "      123456      ");
        printf("\forg:|%s|,", dummy );
        printf("new:|%s|\n", TrimRight( dummy, ' ' ));
        
        printf("\npress a key");
        WaitForKey();
    }
}