---
layout: doc
title: strings / clear_bit
---
# clear_bit

### NAME

    clear_bit() - zero a bit in a bit string

### SYNOPSIS

    string clear_bit( string str, int n );

### DESCRIPTION

    Return  the  new  string where bit <n> is cleared in string <str>. Note
    that the old string <str> is not modified.

### SEE ALSO

    set_bit(3), test_bit(3)

