16#include "arcane/utils/ValueConvert.h"
33static char global_hexa[16] = {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
34 'a',
'b',
'c',
'd',
'e',
'f' };
44 UniqueArray<Byte> out_buf;
46 out_buf.resize((len*2)+1);
47 for(
Int64 i=0; i<len; ++i ){
48 int v = std::to_integer<int>(input[i]);
49 out_buf[(i*2)] = global_hexa[v/16];
50 out_buf[(i*2)+1] = global_hexa[v%16];
52 out_buf[len*2] =
'\0';
63 return _toHexaString(input);
83 output[(i*2)] = global_hexa[v/16];
84 output[(i*2)+1] = global_hexa[v%16];
constexpr __host__ __device__ SizeType size() const noexcept
Retourne la taille du tableau.
Vue d'un tableau d'éléments de type T.
Chaîne de caractères unicode.
String toHexaString(ByteConstArrayView input)
Converti un tableau d'octet en sa représentation hexadécimale.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
double Real
Type représentant un réel.
Impl::SpanTypeFromSize< conststd::byte, SizeType >::SpanType asBytes(const SpanImpl< DataType, SizeType, Extent > &s)
Converti la vue en un tableau d'octets non modifiables.
ConstArrayView< Byte > ByteConstArrayView
Equivalent C d'un tableau à une dimension de caractères.
unsigned char Byte
Type d'un octet.