// append 1;3;38;5;216 like string that represents ANSI
// color of the Color; the zero argument requires
// appending of '0' before to reset previous format
// and colors
557037
func (c Color) appendNos(bs []byte, zero bool) []byte {

	if zero {
		bs = append(bs, '0') // reset previous
	}

	// formats
	//

	if c&maskFm != 0 {

		// 1-2

		// don't combine bold and faint using only on of them, preferring bold

		if c&BoldFm != 0 {
			bs = appendSemi(bs, zero, '1')
		} else if c&FaintFm != 0 {
			bs = appendSemi(bs, zero, '2')
		}

		// 3-9

		const mask9 = ItalicFm | UnderlineFm |
			SlowBlinkFm | RapidBlinkFm |
			ReverseFm | ConcealFm | CrossedOutFm

		if c&mask9 != 0 {
			bs = c.appendFm9(bs, zero)
		}

		// 20-21

		const (
			mask21 = FrakturFm | DoublyUnderlineFm
			mask9i = BoldFm | FaintFm | mask9
		)

		if c&mask21 != 0 {
			bs = appendCond(bs, c&FrakturFm != 0,
				zero || c&mask9i != 0,
				'2', '0')
			bs = appendCond(bs, c&DoublyUnderlineFm != 0,
				zero || c&(mask9i|FrakturFm) != 0,
				'2', '1')
		}

		// 50-53

		const (
			mask53  = FramedFm | EncircledFm | OverlinedFm
			mask21i = mask9i | mask21
		)

		if c&mask53 != 0 {
			bs = appendCond(bs, c&FramedFm != 0,
				zero || c&mask21i != 0,
				'5', '1')
			bs = appendCond(bs, c&EncircledFm != 0,
				zero || c&(mask21i|FramedFm) != 0,
				'5', '2')
			bs = appendCond(bs, c&OverlinedFm != 0,
				zero || c&(mask21i|FramedFm|EncircledFm) != 0,
				'5', '3')
		}

	}

	// foreground
	if c&maskFg != 0 {
		bs = c.appendFg(bs, zero)
	}

	// background
	if c&maskBg != 0 {
		bs = c.appendBg(bs, zero)
	}

	return bs
}
269874
func (body *Body) Append(expr *Expr) {
	n := len(*body)
	expr.Index = n
	*body = append(*body, expr)
}
237433
func (l *List) AppendString(text string) {
	l.errs = append(l.errs, errors.New(text))
	l.err = nil
}
282004
func AppendStr(strs []string, str string) []string {
	for _, s := range strs {
		if s == str {
			return strs
		}
	}
	return append(strs, str)
}
1252215
func (s *BytesWriter) Append(args ...interface{}) {
	s.args = append(s.args, args...)
}
429702
func (errs *MultiError) Append(err error) {
	if err != nil {
		*errs = append(*errs, err)
	}
}
508692
func AppendHex(dst []byte, i uint32) []byte {
	if i == 0 {
		return append(dst, '0')
	}
	for j := 7; j >= 0; j-- {
		v := i >> uint(j*4)
		if v > 0 {
			dst = append(dst, HexDigit[v&0xf])
		}
	}
	return dst
}
728098
func (r *Result) Append(val *resource.Info) {
	*r = append(*r, val)
}
1146356
func (c *Chunk) Append(other *Chunk, begin, end int) {
	for colID, src := range other.columns {
		dst := c.columns[colID]
		if src.isFixed() {
			elemLen := len(src.elemBuf)
			dst.data = append(dst.data, src.data[begin*elemLen:end*elemLen]...)
		} else {
			beginOffset, endOffset := src.offsets[begin], src.offsets[end]
			dst.data = append(dst.data, src.data[beginOffset:endOffset]...)
			for i := begin; i < end; i++ {
				dst.offsets = append(dst.offsets, dst.offsets[len(dst.offsets)-1]+src.offsets[i+1]-src.offsets[i])
			}
		}
		for i := begin; i < end; i++ {
			dst.appendNullBitmap(!src.isNull(i))
			dst.length++
		}
	}
	c.numVirtualRows += end - begin
}
209512
func (b *Buffer) Append(c ...Chunk) {
	for _, chunk := range c {
		b.appendChunk(chunk)
	}
}
666513
func (s *Statistics) Append(o *Statistics) {
	// Compute minimum and maximum aggregates by comparing both objects,
	// ensuring that zero valued items are not overriding the comparision.
	// Must come before any other aggregation.
	if o.samples > 0 {
		if o.maximum > s.maximum {
			s.maximum = o.maximum
		}

		if s.samples == 0 || o.minimum < s.minimum {
			s.minimum = o.minimum
		}
	}

	// Update the current statistics object
	s.total += o.total
	s.samples += o.samples
	s.squares += o.squares
}
642035
func (b *Bitset) Append(other *Bitset) {
	b.ensureCapacity(other.numBits)

	for i := 0; i < other.numBits; i++ {
		if other.At(i) {
			b.bits[b.numBits/8] |= 0x80 >> uint(b.numBits%8)
		}
		b.numBits++
	}
}
784151
func (c *client) concatenate(key1, key2, key3 string, uploadID *string) (*string, *string, error) {
	// The first part to be uploaded which is represented as part number 1
	foo, err := c.s3Client.UploadPartCopy(&s3.UploadPartCopyInput{
		Bucket:     c.bucket,
		CopySource: aws.String(url.QueryEscape(*c.bucket + "/" + key1)),
		PartNumber: aws.Int64(1),
		Key:        &key3,
		UploadId:   uploadID,
	})
	if err != nil {
		return nil, nil, err
	}

	// The second part that is going to be appended to the newly created testKey
	// object.
	bar, err := c.s3Client.UploadPartCopy(&s3.UploadPartCopyInput{
		Bucket:     c.bucket,
		CopySource: aws.String(url.QueryEscape(*c.bucket + "/" + key2)),
		PartNumber: aws.Int64(2),
		Key:        &key3,
		UploadId:   uploadID,
	})
	if err != nil {
		return nil, nil, err
	}
	// The ETags are needed to complete the process
	return foo.CopyPartResult.ETag, bar.CopyPartResult.ETag, nil
}
1350179
func (f Form) AppendString(out []byte, src string) []byte {
	return f.doAppend(out, inputString(src), len(src))
}
85149
func appendStringify(buf []byte, s string) []byte {
	if mustMarshalString(s) {
		b, _ := jsongo.Marshal(s)
		return append(buf, b...)
	}
	buf = append(buf, '"')
	buf = append(buf, s...)
	buf = append(buf, '"')
	return buf
}
868577
func Colorizef(c Color, b BackgroundColor, format string, args ...interface{}) string {
	args = append([]interface{}{ResetColors, c, b}, args...)
	args = append(args, ResetColors)
	return fmt.Sprintf("%s%s%s"+format+"%s", args...)
}
507892
func Append(buf *strings.Builder, node SQLNode) {
	tbuf := &TrackedBuffer{
		Builder: buf,
	}
	node.Format(tbuf)
}