remove unused function Change-Id: I33472f3318dc10292366bd2db9438f560eb8153b Reviewed-on: https://gn-review.googlesource.com/c/gn/+/16260 Reviewed-by: Petr Hosek <phosek@google.com> Commit-Queue: Takuto Ikuta <tikuta@google.com>
diff --git a/src/base/strings/string_util.cc b/src/base/strings/string_util.cc index 1083942..5af7715 100644 --- a/src/base/strings/string_util.cc +++ b/src/base/strings/string_util.cc
@@ -1018,29 +1018,4 @@ return result; } -// The following code is compatible with the OpenBSD lcpy interface. See: -// http://www.gratisoft.us/todd/papers/strlcpy.html -// ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/{wcs,str}lcpy.c - -namespace { - -template <typename CHAR> -size_t lcpyT(CHAR* dst, const CHAR* src, size_t dst_size) { - for (size_t i = 0; i < dst_size; ++i) { - if ((dst[i] = src[i]) == 0) // We hit and copied the terminating NULL. - return i; - } - - // We were left off at dst_size. We over copied 1 byte. Null terminate. - if (dst_size != 0) - dst[dst_size - 1] = 0; - - // Count the rest of the |src|, and return it's length in characters. - while (src[dst_size]) - ++dst_size; - return dst_size; -} - -} // namespace - } // namespace base