ajout cv::complen

This commit is contained in:
Jephté Clain 2025-02-05 06:26:41 +04:00
parent de3b84441d
commit 1a42d8adec
1 changed files with 9 additions and 0 deletions

View File

@ -222,4 +222,13 @@ class cv {
if ($a > $b) return 1;
return 0;
}
/** comparer la longueur de $a et $b */
static final function complen($a, $b): int {
if (is_array($a)) $la = count($a);
else $la = strlen(strval($a));
if (is_array($b)) $lb = count($b);
else $lb = strlen(strval($b));
return self::compare($la, $lb);
}
}