# Missing 0 in hex output

**URL:** https://discourse.nodered.org/t/missing-0-in-hex-output/52911
**Category:** General
**Created:** [28 October 2021 20:03 UTC](https://discourse.nodered.org/t/missing-0-in-hex-output/52911 "2021-10-28T20:03:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![New2Node](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@New2Node](https://discourse.nodered.org/u/New2Node)
#### Post date: [28 October 2021 20:03 UTC](https://discourse.nodered.org/t/missing-0-in-hex-output/52911/1 "2021-10-28T20:03:40Z")

</div>

Hi, I’m trying to fill missing “0” charters in a string.

I have a XOR function that outputs an array, when I change this to a string it removes the leading zero which I need.

E.g:

BD 64 5A 44 5F DE 6 BA

I need the output to show 16 characters:

BD 64 5A 44 5F DE 06 BA

How do fill the missing 0 in a string?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [29 October 2021 06:30 UTC](https://discourse.nodered.org/t/missing-0-in-hex-output/52911/2 "2021-10-29T06:30:37Z")

</div>

Show us what the incoming data looks like in a debug node and show us the code you are using to convert it.

---

<div class="post-metadata">

### Author: ![New2Node](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@New2Node](https://discourse.nodered.org/u/New2Node)
#### Post date: [30 October 2021 07:03 UTC](https://discourse.nodered.org/t/missing-0-in-hex-output/52911/3 "2021-10-30T07:03:47Z")

</div>

Hi Colin,

I got this working using the buffer-parser node

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [13 November 2021 07:03 UTC](https://discourse.nodered.org/t/missing-0-in-hex-output/52911/4 "2021-11-13T07:03:58Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
