/*
**    Name: ossup_string_copy.c
**
**    C version of OSSupLib's s.string for ROBE 64-bit builds
**    (s.string is 32-bit ARM assembler).
**
**    Copy a control-terminated string, terminate it with '\0' and
**    return the number of characters copied.
*/

#include "ossup_string.h"

int ossup_string_copy(char *to, char *from)
    {
    int count = 0;

    while ((unsigned char)from[count] >= 32)
        {
        to[count] = from[count];
        count++;
        }

    to[count] = '\0';

    return count;
    }
