[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / lib / misc / cbits / PackedString.c
1 /* -----------------------------------------------------------------------------
2  * $Id: PackedString.c,v 1.2 1998/12/02 13:26:41 simonm Exp $
3  *
4  * PackedString C bits
5  *
6  * (c) The GHC Team 1998
7  * -------------------------------------------------------------------------- */
8
9 #include "Rts.h"
10
11 StgInt
12 byteArrayHasNUL__ (StgByteArray ba, StgInt len)
13 {
14     StgInt i;
15
16     for (i = 0; i < len; i++) {
17         if (*(ba + i) == '\0') {
18             return(1); /* true */
19         }
20     }
21
22     return(0); /* false */
23 }