O'Reilly logo

Beginning C++ Programming by Richard Grimes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using facets

Internationalization rules are known as facets. A locale object is a container of facets, and you can test if the locale has a specific facet using the has_facet function; if it does, you can get a const reference to the facet by calling the use_facet function. There are six types of facets summarized by seven categories of class in the following table. A facet class is a subclass of the locale::facet nested class.

Facet type Description
codecvt, ctype Converts between one encoding scheme to another and is used to classify characters and convert them to upper or lowercase
collate Controls the ordering and grouping of characters in a string, including comparing and hashing of strings
messages Retrieves localized messages ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required