Parse the given string and skip the first word. * * Words are assumed to be separated by spaces or tabs. * * @param[in] cmd The string whose first word will be skipped. * * @return The pointer in the string cmd to the second word in the string, or * nullptr if there is no second word. */
| 796 | * nullptr if there is no second word. |
| 797 | */ |
| 798 | char * |
| 799 | skip(char *cmd) |
| 800 | { |
| 801 | // Skip initial white space. |
| 802 | cmd += strspn(cmd, " \t"); |
| 803 | // Point to the beginning of the next white space. |
| 804 | cmd = strpbrk(cmd, " \t"); |
| 805 | if (!cmd) { |
| 806 | return cmd; |
| 807 | } |
| 808 | // Skip the second white space so that cmd now points to the beginning of the |
| 809 | // second word. |
| 810 | cmd += strspn(cmd, " \t"); |
| 811 | return cmd; |
| 812 | } |
| 813 | |
| 814 | // Handler for things that need to wait until the cache is initialized. |
| 815 | void |
no outgoing calls
no test coverage detected