v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
uri.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_STRINGS_URI_H_
6#define V8_STRINGS_URI_H_
7
10
11namespace v8 {
12namespace internal {
13
14class Uri : public AllStatic {
15 public:
16 // ES6 section 18.2.6.2 decodeURI (encodedURI)
19 return Decode(isolate, uri, true);
20 }
21
22 // ES6 section 18.2.6.3 decodeURIComponent (encodedURIComponent)
24 Isolate* isolate, DirectHandle<String> component) {
25 return Decode(isolate, component, false);
26 }
27
28 // ES6 section 18.2.6.4 encodeURI (uri)
31 return Encode(isolate, uri, true);
32 }
33
34 // ES6 section 18.2.6.5 encodeURIComponent (uriComponent)
36 Isolate* isolate, DirectHandle<String> component) {
37 return Encode(isolate, component, false);
38 }
39
40 // ES6 section B.2.1.1 escape (string)
42 Handle<String> string);
43
44 // ES6 section B.2.1.2 unescape (string)
46 Handle<String> string);
47
48 private:
51 bool is_uri);
54 bool is_uri);
55};
56
57} // namespace internal
58} // namespace v8
59
60#endif // V8_STRINGS_URI_H_
static MaybeDirectHandle< String > EncodeUriComponent(Isolate *isolate, DirectHandle< String > component)
Definition uri.h:35
static MaybeDirectHandle< String > Unescape(Isolate *isolate, Handle< String > string)
Definition uri.cc:514
static MaybeDirectHandle< String > Decode(Isolate *isolate, DirectHandle< String > uri, bool is_uri)
Definition uri.cc:177
static MaybeDirectHandle< String > DecodeUri(Isolate *isolate, DirectHandle< String > uri)
Definition uri.h:17
static MaybeDirectHandle< String > DecodeUriComponent(Isolate *isolate, DirectHandle< String > component)
Definition uri.h:23
static MaybeDirectHandle< String > Encode(Isolate *isolate, DirectHandle< String > uri, bool is_uri)
Definition uri.cc:280
static MaybeDirectHandle< String > Escape(Isolate *isolate, Handle< String > string)
Definition uri.cc:507
static MaybeDirectHandle< String > EncodeUri(Isolate *isolate, DirectHandle< String > uri)
Definition uri.h:29