> std::string data = ?Abc?;
> std::transform(data.begin(), data.end(), data.begin(), ::toupper);
यह काम करेगा, लेकिन यह मानक "सी" लोकेल का उपयोग करेगा। यदि आप किसी अन्य लोकेल के लिए टोलर प्राप्त करने की आवश्यकता है तो आप पहलुओं का उपयोग कर सकते हैं। पहलू का उपयोग कर उपरोक्त कोड होगा:
locale loc("");
const ctype& ct = use_facet >(loc);
transform(str.begin(), str.end(), std::bind1st(std::mem_fun(&ctype::tolower), &ct));