summaryrefslogtreecommitdiffstats
path: root/lib/private/naturalsort_defaultcollator.php
blob: e1007f8d7b4d03e042b950eda7ae5d010d23df71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/**
 * Copyright (c) 2014 Vincent Petry <PVince81@owncloud.com>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 *
 */

namespace OC;

class NaturalSort_DefaultCollator {
	public function compare($a, $b) {
		if ($a === $b) {
			return 0;
		}
		return ($a < $b) ? -1 : 1;
	}
}