File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 14
14
+ (double )haversineDistance : (CLLocationCoordinate2D)coordinateA coordinateB : (CLLocationCoordinate2D)coordinateB ;
15
15
+ (NSNumber * _Nullable)numberFromString : (NSString * _Nullable)string ;
16
16
+ (NSNumber * _Nullable)numberFromString : (NSString * _Nullable)string withLocale : (NSLocale * _Nullable)locale ;
17
+
18
+ /* *
19
+ * Get the CT normalized version of an event or a property name.
20
+ */
17
21
+ (NSString * _Nullable)getNormalizedName : (NSString * _Nullable)name ;
22
+
23
+ /* *
24
+ * Check if two event/property names are equal with applied CT normalization
25
+ */
18
26
+ (BOOL )areEqualNormalizedName : (NSString * _Nullable)firstName andName : (NSString * _Nullable)secondName ;
19
27
20
28
@end
Original file line number Diff line number Diff line change @@ -144,6 +144,8 @@ + (NSNumber * _Nullable)numberFromString:(NSString * _Nullable)string withLocale
144
144
145
145
+ (NSString * _Nullable)getNormalizedName : (NSString * _Nullable)name {
146
146
if (name) {
147
+ // Lowercase with English locale for consistent behavior with the backend
148
+ // and across different device locales.
147
149
NSString *normalizedName = [name stringByReplacingOccurrencesOfString: @" " withString: @" " ];
148
150
NSLocale *englishLocale = [[NSLocale alloc ] initWithLocaleIdentifier: @" en_US" ];
149
151
normalizedName = [normalizedName lowercaseStringWithLocale: englishLocale];
You can’t perform that action at this time.
0 commit comments