From c2e2e5543ed75f258958b6d31cff6751accbed4f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 6 Sep 2018 19:39:28 +0200 Subject: [PATCH] util/WStringAPI: add wcscoll() wrapper --- src/util/StringAPI.hxx | 2 +- src/util/WStringAPI.hxx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/util/StringAPI.hxx b/src/util/StringAPI.hxx index 483f8a292..56b20087f 100644 --- a/src/util/StringAPI.hxx +++ b/src/util/StringAPI.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2017 Max Kellermann + * Copyright 2010-2018 Max Kellermann * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/util/WStringAPI.hxx b/src/util/WStringAPI.hxx index 830b84a9a..739c4efd5 100644 --- a/src/util/WStringAPI.hxx +++ b/src/util/WStringAPI.hxx @@ -168,6 +168,13 @@ StringIsEqualIgnoreCase(const wchar_t *a, const wchar_t *b, #endif +gcc_pure gcc_nonnull_all +static inline int +StringCollate(const wchar_t *a, const wchar_t *b) noexcept +{ + return wcscoll(a, b); +} + gcc_malloc gcc_returns_nonnull gcc_nonnull_all static inline wchar_t * DuplicateString(const wchar_t *p) noexcept