-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathJXLDStringDistance.h
27 lines (24 loc) · 1.39 KB
/
JXLDStringDistance.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// JXLDStringDistance.h
// DamerauLevenshtein
//
// Created by Jan on 18.01.11.
// Copyright 2011-2012 geheimwerk.de. All rights reserved.
//
// MIT License.
typedef NS_OPTIONS(NSUInteger, JXLDStringDistanceOptions) {
JXLDCaseInsensitiveComparison = 1, /* If specified, ignores the case (a == A) */
JXLDLiteralComparison = 2, /* Exact character-by-character equivalence */
JXLDWhitespaceInsensitiveComparison = 4, /* If specified, ignores white space */
JXLDWhitespaceTrimmingComparison = 8, /* If specified, trims white space from both ends (" A B C " == "A B C") */
JXLDDiacriticInsensitiveComparison = 128, /* If specified, ignores diacritics (o-umlaut == o) */
JXLDWidthInsensitiveComparison = 256, /* If specified, ignores width differences ('a' == U+FF41) */
JXLDDelimiterInsensitiveComparison = 512, /* If specified, replaces common delimiters ('_', '-') with space (' ') before comparison */
JXLDQuoteTypeInsensitiveComparison = 1024, /* If specified, replaces curly quotes (“”‘’) with straigh ones ("') before comparison */
};
/*
Important:
Please note that JXLDDelimiterInsensitiveComparison is processed before JXLDWhitespaceInsensitiveComparison and JXLDWhitespaceTrimmingComparison.
This results is that the affected delimiter characters are effectively being removed before the comparison takes place
(all for the former option, only those at both ends for the latter).
*/