Performance issues

The case-conversion functions assign the destination character regardless of whether the source character has a case-equivalent character. If no case equivalent for a particular source character exists, the functions return only the source character. Therefore, the following two algorithms perform the same task:
  • Calling the case-conversion function regardless of the existence of a case-equivalent character, as follows:
    dst_wc = ifx_gl_towlower(src_wc);
  • Calling the case-conversion function only if a case-equivalent character exists, as follows:
    if ( ifx_gl_iswupper(src_wc) )
       dst_wc = ifx_gl_towlower(src_wc);
    else
       dst_wc = src_wc;

However, the first approach is usually faster.