You are here

function _tableofcontents_letter in Table of Contents 6.3

Same name and namespace in other branches
  1. 7.2 tableofcontents.themes.inc \_tableofcontents_letter()
  2. 7 tableofcontents.pages.inc \_tableofcontents_letter()

Transform a decimal number into a set of letters

1 call to _tableofcontents_letter()
_tableofcontents_convert_number in ./tableofcontents.pages.inc
Transform a decimal number in one of:

File

./tableofcontents.pages.inc, line 1157
Applies the filter functions.

Code

function _tableofcontents_letter($number) {
  while ($number > 0) {
    $result = chr($number % 26 + 64) . $result;
    $number = (int) ($number / 26);
  }
  return $result;
}