SS8_INIT_MOVE(3)                 Ssstr Manual                 SS8_INIT_MOVE(3)



NAME
       ss8_init_move,  ss8_init_move_destroy - initialize an ssstr byte string
       by moving the value of another byte string

SYNOPSIS
       #include <ss8str.h>

       ss8str *ss8_init_move(ss8str *restrict str,
                             ss8str *restrict src);
       ss8str *ss8_init_move_destroy(ss8str *restrict str,
                             ss8str *restrict src);

DESCRIPTION
       ss8_init_move() initializes the ss8str object that str points  to,  and
       sets  its value to that of the ss8str object at src.  The object at src
       remains valid but its value becomes indeterminate.

       ss8_init_move_destroy() is like ss8_init_move(), except that the ss8str
       object at src becomes invalid (destroyed) after the move; that is,

           ss8_init_move_destroy(str, src);

       is equivalent to

           ss8_init_move(str, src);
           ss8_destroy(src);

       For  both  functions, behavior is undefined unless str points to an in‐
       valid ss8str object, src points to a valid ss8str object, and  str  and
       src point to distinct objects.

       No memory allocation or deallocation is performed.

RETURN VALUE
       ss8_init_move() and ss8_init_move_destroy() return dest.

NOTES
       Care  should  be taken not to use the value of the ss8str object at src
       after  the  move.   It  must  still  be  destroyed  in  the   case   of
       ss8_init_move().

SEE ALSO
       ss8_destroy(3),     ss8_init(3),     ss8_init_copy(3),     ss8_move(3),
       ss8_swap(3), ssstr(7)



SSSTR                             2023-12-30                  SS8_INIT_MOVE(3)