SYNOPSIS string copy_bits(string src, string dest [, int srcstart [, int deststart [, int copylen ]]]) DESCRIPTION Copy the bitrange [..+[ from bitstring and copy it into the bitstring starting at , overwriting the original bits at those positions. The resulting combined string is returned, the input strings remain unaffected. If is not given, is copied from the start. If is negative, it is counted from one past the last set bit in the string (ie. '-1' will index the last set bit). If is not given, will be overwritten from the start. If is negative, it is counted from one past the last set bit in the string (ie. '-1' will index the last set bit). If is not given, it is assumed to be infinite, ie. the result will consist of up to position , followed by the data copied from . If is negative, the function will copy the abs() bits _before_ 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)