Skip to content

Commit ebdc0d9

Browse files
authored
Merge pull request #671 from Shallowmallow/BetterThousandSeparator
Negative lookbehind to ensure the match is not part of the decimal fr…
2 parents a1faab7 + 175f41f commit ebdc0d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

haxe/ui/util/StringUtil.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class StringUtil {
8787
}
8888

8989
#if !macro // stringtools gets used in macros, but some functions rely on haxeui "bits" (like locales), lets wrap to avoid problems
90-
private static var humanReadableRegex = ~/\B(?=(\d{3})+(?!\d))/g;
90+
private static var humanReadableRegex = ~/\B(?=(\d{3})+(?!\d))(?<!\.\d*)/g;
9191
private static inline var THOUSAND:Int = 1000;
9292
private static inline var MILLION:Int = THOUSAND * THOUSAND;
9393
private static inline var BILLION:Int = MILLION * THOUSAND;

0 commit comments

Comments
 (0)