For the Table of Contents (ToC) I need to add additional information and formatting for chapter entries.
From looking at the latex.ltx file I discovered that .toc file has entries that is passed to the macro as a parameter for formatting the ToC entry. A typical .toc file entry is as follows:
\contentsline {chapter}{\numberline {1}Exploring the page layout}{1}
Resulting in macro parameter being as follows for the above .toc file entry:
\numberline {1}Exploring the page layout
I need to extract the number that appears within the braces { } for additional formatting. Is there a way to obtain the number without using additional packages such as xstring?