blob: 875d49c613255fc654bc868222dad8cdc7c65d4d [file] [log] [blame]
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Provides shared functions used by the internals of the parser and
// canonicalizer for file URLs. Do not use outside of these modules.
#include "src/lib/url/url_parse_internal.h"
namespace url {
// Returns the index of the next slash in the input after the given index, or
// spec_len if the end of the input is reached.
inline int FindNextSlash(const char* spec, size_t begin_index, size_t spec_len) {
size_t idx = begin_index;
while (idx < spec_len && !IsURLSlash(spec[idx]))
return idx;
} // namespace url