v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
hex-format.h
Go to the documentation of this file.
1// Copyright 2022 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_UTILS_HEX_FORMAT_H_
6#define V8_UTILS_HEX_FORMAT_H_
7
8#include <stddef.h>
9#include <stdint.h>
10
11namespace v8 {
12namespace internal {
13
14// Takes a byte array in `val` and formats into a hex-based character array
15// contained within `formatted`. `formatted` should be a valid buffer which is
16// at least 2x the size of `size_of_val`. Additionally, `size_of_val` should be
17// less than 0x20000000. If either of these invariants is violated, a CHECK will
18// occur.
19void FormatBytesToHex(char* formatted, size_t size_of_formatted,
20 const uint8_t* val, size_t size_of_val);
21
22} // namespace internal
23} // namespace v8
24
25#endif // V8_UTILS_HEX_FORMAT_H_
icu::number::FormattedNumber formatted
void FormatBytesToHex(char *formatted, size_t size_of_formatted, const uint8_t *val, size_t size_of_val)
Definition hex-format.cc:15