I want to convert a number into a not zero-terminated char array without any predifined C / C++ function (e.g itoa). I don't have much space left (working on an embedded application with 5KB pgm space total of which I'm allready using 4.862KB) and my output function doesn't accept zero-terminated char arrays; only an array and the length.
EDIT 1: I'm not working for a company :P
EDIT 2: Doesn't accept means that for no reason it won't send if there's a 0-byte inside the array.
EDIT 3: I solved it using a modified version of the method from 'Vlad from Moscow' below. Still thanks to all of you, who tried helping me :)
EDIT 4: If anybody cares: The project is setting an AVR based alarm clock using bluetooth.