ajout cv::complen
This commit is contained in:
parent
de3b84441d
commit
1a42d8adec
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue