This isn't even legal code:
removeSplChars('Kitchen Tools', 'Textiles', 'Chef's Apron', '');
I have marked in red the strings in that code. A string begins with a " or ' and ends with the next matching " or '.
If you want to embed a " or ' inside a string that is delimited by the same character, you must "escape" the character:
removeSplChars('Kitchen Tools', 'Textiles', 'Chef\'s Apron', '');
or you can use the other string delimiter:
removeSplChars('Kitchen Tools', 'Textiles', "Chef's Apron", '');
Anyway, I *suspect* that you simply have hour call to the function in the wrong place. Remove it from where you have it and try it here:
2, // This custom var is set to slot #2.
'Kitchen Tools', // The top-level name for your online content categories.
removeSplChars('Kitchen Tools|Textiles|Chef\'s Apron|'), // Records value of breadcrumb name
3 // Sets the scope to page-level.
But that's purely a guess.
At the least, it should produce no errors.