#include <file.h>
Definition at line 362 of file file.h.
◆ UriDecoder()
dart::bin::UriDecoder::UriDecoder |
( |
const char * |
uri | ) |
|
|
explicit |
Definition at line 1423 of file file.cc.
1423 : uri_(uri) {
1424 const char* ch = uri;
1425 while ((*ch != '\0') && (*ch != '%')) {
1426 ch++;
1427 }
1428 if (*ch == 0) {
1429
1430 decoded_ = const_cast<char*>(uri);
1431 return;
1432 }
1433 const intptr_t
len = strlen(uri);
1434
1435
1438
1439 strncpy(
dest, uri,
i);
1442 while (*ch != '\0') {
1443 if (*ch != '%') {
1444 *(
dest++) = *(ch++);
1445 continue;
1446 }
1447 if ((
i + 3 >
len) || !HexCharPairToByte(ch + 1,
dest)) {
1448 free(decoded_);
1449 decoded_ = nullptr;
1450 return;
1451 }
1453 ch += 3;
1454 }
1456}
void * malloc(size_t size)
◆ ~UriDecoder()
dart::bin::UriDecoder::~UriDecoder |
( |
| ) |
|
Definition at line 1458 of file file.cc.
1458 {
1459 if (uri_ != decoded_ && decoded_ != nullptr) {
1460 free(decoded_);
1461 }
1462}
◆ decoded()
const char * dart::bin::UriDecoder::decoded |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
- third_party/dart-lang/sdk/runtime/bin/file.h
- third_party/dart-lang/sdk/runtime/bin/file.cc