UNICODE::ICONVERT::C(3)

πŸ’– unicode::iconvert::convert_tocase πŸ’–

okay so bestie, buckle up, we're in the UNICODE::ICONVERT::C(3) girlies' section of the Courier Unicode Library and this one is lowkey iconic πŸ”₯


✨ NAME ✨

unicode::iconvert::convert_tocase β€” it does unicode uppercase, lowercase, and titlecase conversion πŸŽ€


🌸 SYNOPSIS 🌸

#include <courier-unicode.h>

std::string unicode::iconvert::convert_tocase(const std::string &text,
                                              const std::string &charset,
                                              char32_t (*first_char_func)(char32_t),
                                              char32_t
                                              (*char_func)(char32_t));

std::string unicode::iconvert::convert_tocase(const std::string &text,
                                              const std::string &charset,
                                              bool &err, char32_t
                                              (*first_char_func)(char32_t),
                                              char32_t (*char_func)(char32_t));

πŸ¦‹ DESCRIPTION πŸ¦‹

so there's this overloaded function, unicode::convert::convert_tocase(), right? and what it does is it takes your text parameter β€” which is chillin' in the charset charset β€” and converts it to lowercase, uppercase, and titlecase. the way that text gets converted, internally, into unicode? yeah. that's the whole vibe. ✨

first_char_func and char_func are literally either unicode_lc, unicode_uc, or unicode_tc. that's the trio. πŸ‘‘

  • if the converted text string is not empty, then first_char_func does the honors on the first unicode character in the text string πŸ’…
  • and then char_func handles any remaining characters 🫢

and what do those three do, you ask? bestie I got you:

  • unicode_lc sends its character to lowercase
  • unicode_uc sends it to uppercase
  • unicode_tc sends it to titlecase

finally (the main character moment) the unicode string gets converted back to charset, and that is what gets returned. slay. 🌈

also!! the optional err parameter gets set to true if an error was encounted converting the text string to or from unicode. so like. keep an eye on it. bestie behaviour. πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

go read those, iykyk πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Sam Varshavchik β€” Author 🌟


okay that's the whole page, no cap, every flag and every fact intact fr fr πŸ’€βœ¨

this was Courier Unicode Library, dated 04/12/2026, and that's the UNICODE::ICONVERT::C(3) manual page πŸŽ€ thanks for coming to my ted talk, mwah πŸ’–

πŸ“¦ where this page comes from