I am looking for the best way to remove the start of a string until the last occurrence of a character. For example. I have a char array that contains the following:
[Microsoft][ODBC SQL Server Driver][SQL Server]Option 'enable_debug_reports' requires a value of 0 or 1.
Basically, I am looking for the last occurrence of ']'. I would like my char array to be trimmed to:
Option 'enable_debug_reports' requires a value of 0 or 1.
I have found several ways to do this with the string data type. I am wondering if there is an effective way to manipulate a char array. My program requires several parameters to be char[] instead of strings. How would I use something like strcpy
in my situation?