ldmud-3.3.719/
ldmud-3.3.719/doc/
ldmud-3.3.719/doc/efun.de/
ldmud-3.3.719/doc/efun/
ldmud-3.3.719/doc/man/
ldmud-3.3.719/doc/other/
ldmud-3.3.719/mud/
ldmud-3.3.719/mud/heaven7/
ldmud-3.3.719/mud/lp-245/
ldmud-3.3.719/mud/lp-245/banish/
ldmud-3.3.719/mud/lp-245/doc/
ldmud-3.3.719/mud/lp-245/doc/examples/
ldmud-3.3.719/mud/lp-245/doc/sefun/
ldmud-3.3.719/mud/lp-245/log/
ldmud-3.3.719/mud/lp-245/obj/Go/
ldmud-3.3.719/mud/lp-245/players/lars/
ldmud-3.3.719/mud/lp-245/room/death/
ldmud-3.3.719/mud/lp-245/room/maze1/
ldmud-3.3.719/mud/lp-245/room/sub/
ldmud-3.3.719/mud/lp-245/secure/
ldmud-3.3.719/mud/sticklib/
ldmud-3.3.719/mud/sticklib/src/
ldmud-3.3.719/mudlib/deprecated/
ldmud-3.3.719/mudlib/uni-crasher/
ldmud-3.3.719/pkg/
ldmud-3.3.719/pkg/debugger/
ldmud-3.3.719/pkg/diff/
ldmud-3.3.719/pkg/misc/
ldmud-3.3.719/src/
ldmud-3.3.719/src/autoconf/
ldmud-3.3.719/src/ptmalloc/
ldmud-3.3.719/src/util/
ldmud-3.3.719/src/util/erq/
ldmud-3.3.719/src/util/indent/hosts/next/
ldmud-3.3.719/src/util/xerq/
ldmud-3.3.719/src/util/xerq/lpc/
ldmud-3.3.719/src/util/xerq/lpc/www/
ldmud-3.3.719/test/generic/
ldmud-3.3.719/test/inc/
ldmud-3.3.719/test/t-0000398/
ldmud-3.3.719/test/t-0000548/
ldmud-3.3.719/test/t-030925/
ldmud-3.3.719/test/t-040413/
ldmud-3.3.719/test/t-041124/
ldmud-3.3.719/test/t-language/
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.3.166

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_bits(E)