1 //===-- UriParser.h ---------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef utility_UriParser_h_
11 #define utility_UriParser_h_
16 // Other libraries and framework includes
17 #include "llvm/ADT/StringRef.h"
25 // if url is valid, function returns true and
26 // scheme/hostname/port/path are set to the parsed values
27 // port it set to -1 if it is not included in the URL
29 // if the url is invalid, function returns false and
30 // output parameters remain unchanged
31 static bool Parse(llvm::StringRef uri, llvm::StringRef &scheme,
32 llvm::StringRef &hostname, int &port,
33 llvm::StringRef &path);
36 #endif // utility_UriParser_h_