ldmud-3.2.9/doc/
ldmud-3.2.9/doc/efun/
ldmud-3.2.9/mud/
ldmud-3.2.9/mud/heaven7/
ldmud-3.2.9/mud/heaven7/lib/
ldmud-3.2.9/mud/lp-245/
ldmud-3.2.9/mud/lp-245/banish/
ldmud-3.2.9/mud/lp-245/doc/
ldmud-3.2.9/mud/lp-245/doc/examples/
ldmud-3.2.9/mud/lp-245/doc/sefun/
ldmud-3.2.9/mud/lp-245/log/
ldmud-3.2.9/mud/lp-245/obj/Go/
ldmud-3.2.9/mud/lp-245/players/lars/
ldmud-3.2.9/mud/lp-245/room/death/
ldmud-3.2.9/mud/lp-245/room/maze1/
ldmud-3.2.9/mud/lp-245/room/sub/
ldmud-3.2.9/mud/lp-245/secure/
ldmud-3.2.9/mud/morgengrauen/
ldmud-3.2.9/mud/morgengrauen/lib/
ldmud-3.2.9/mud/sticklib/
ldmud-3.2.9/mud/sticklib/src/
ldmud-3.2.9/mudlib/uni-crasher/
ldmud-3.2.9/pkg/
ldmud-3.2.9/pkg/debugger/
ldmud-3.2.9/pkg/diff/
ldmud-3.2.9/pkg/misc/
ldmud-3.2.9/src/autoconf/
ldmud-3.2.9/src/bugs/
ldmud-3.2.9/src/bugs/MudCompress/
ldmud-3.2.9/src/bugs/b-020916-files/
ldmud-3.2.9/src/bugs/doomdark/
ldmud-3.2.9/src/bugs/ferrycode/ferry/
ldmud-3.2.9/src/bugs/ferrycode/obj/
ldmud-3.2.9/src/bugs/psql/
ldmud-3.2.9/src/done/
ldmud-3.2.9/src/done/order_alist/
ldmud-3.2.9/src/done/order_alist/obj/
ldmud-3.2.9/src/done/order_alist/room/
ldmud-3.2.9/src/gcc/
ldmud-3.2.9/src/gcc/2.7.0/
ldmud-3.2.9/src/gcc/2.7.1/
ldmud-3.2.9/src/hosts/
ldmud-3.2.9/src/hosts/GnuWin32/
ldmud-3.2.9/src/hosts/amiga/NetIncl/
ldmud-3.2.9/src/hosts/amiga/NetIncl/netinet/
ldmud-3.2.9/src/hosts/amiga/NetIncl/sys/
ldmud-3.2.9/src/hosts/i386/
ldmud-3.2.9/src/hosts/msdos/byacc/
ldmud-3.2.9/src/hosts/msdos/doc/
ldmud-3.2.9/src/hosts/os2/
ldmud-3.2.9/src/hosts/win32/
ldmud-3.2.9/src/util/
ldmud-3.2.9/src/util/erq/
ldmud-3.2.9/src/util/indent/hosts/next/
ldmud-3.2.9/src/util/xerq/
ldmud-3.2.9/src/util/xerq/lpc/
ldmud-3.2.9/src/util/xerq/lpc/www/
SYNOPSIS

        string copy_bits(string src, string dest
                         [, int srcstart [, int deststart [, int copylen ]]]
                        )

DESCRIPTION
        Copy the bitrange [<srcstart>..<srcstart>+<copylen>[ from
        bitstring <src> and copy it into the bitstring <dest> starting
        at <deststart>, overwriting the original bits at those positions.

        The resulting combined string is returned, the input strings remain
        unaffected.

        If <srcstart> is not given, <src> is copied from the start.
        If <srcstart> is negative, it is counted from one past the last set
        bit in the string (ie. '-1' will index the last set bit).

        If <deststart> is not given, <dest> will be overwritten from the start.
        If <deststart> is negative, it is counted from one past the last set
        bit in the string (ie. '-1' will index the last set bit).

        If <copylen> is not given, it is assumed to be infinite, ie. the result
        will consist of <dest> up to position <deststart>, followed by
        the data copied from <src>.
        If <copylen> is negative, the function will copy the abs(<copylen>)
        bits _before_ <srcstart> in to the result.

        None of the range limits can become negative.

EXAMPLES
        copy_bits(src, dest, 10)    === src[10..]
        copy_bits(src, dest, 10, 5) === dest[0..4] + src[10..]
        copy_bits(src, dest, 10, 5, 3)
                                    === dest[0..4] + src[10..12] + dest[8..]

          (The src[]/dest[] is just for explanatory purposes!)

HISTORY
        Introduced in LDMud 3.2.9.

SEE ALSO
        clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
        count_bits(E), or_bits(E), xor_bits(E), invert_bits(E), and_bit(E)