함수 dechex()

Jmnote (토론 | 기여)님의 2015년 10월 15일 (목) 01:36 판 (→‎Bash)

1 개요

hex
dechex
  • decimal to hexadecimal
  • 10진수 → 16진수

2 Bash

result=`printf %x 10`
echo $result
# a
result=`printf %x 47`
echo $result
# 2f
result=`printf %x 65535`
echo $result
# ffff

3 PHP

echo dechex(10); // a
echo dechex(47); // 2f

4 Python

print( hex(10) ) # 0xa
print( hex(47) ) # 0x2f
print( hex(65535) ) #0xffff

5 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}