You are here

public static function PHPExcel_ReferenceHelper::columnReverseSort in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/ReferenceHelper.php \PHPExcel_ReferenceHelper::columnReverseSort()

* Compare two column addresses * Intended for use as a Callback function for reverse sorting column addresses by column * *

Parameters

string $a First column to test (e.g. 'AA'): * @param string $b Second column to test (e.g. 'Z') * @return integer

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/ReferenceHelper.php, line 91

Class

PHPExcel_ReferenceHelper
PHPExcel_ReferenceHelper (Singleton)

Code

public static function columnReverseSort($a, $b) {
  return 1 - strcasecmp(strlen($a) . $a, strlen($b) . $b);
}