Re: write



On Mon, 28 Apr 2008 21:30:58 +0000, Bill Cunningham wrote:

"Joe Pfeiffer" <pfeiffer@xxxxxxxxxxx> wrote in message
news:1b3ap6znvd.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
strlen+1?

No I just ssed strlen(string) and passed it to write's last
parameter.
Would I just use strlen+1 as you say or strlen+'\0' ?

Bill

STRLEN(3) Linux Programmer’s Manual
STRLEN(3)

NAME
strlen - calculate the length of a string

SYNOPSIS
#include <string.h>

size_t strlen(const char *s);

DESCRIPTION
The strlen() function calculates the length of the
string s, not including the terminating ’\0’ character.

RETURN VALUE
The strlen() function returns the number of characters in s.

CONFORMING TO
SVr4, 4.3BSD, C89, C99.

SEE ALSO
string(3), wcslen(3), wcsnlen(3)


--
Tayo'y Mga Pinoy
.



Relevant Pages

  • [TOMOYO #15 3/8] Common functions for TOMOYO Linux.
    ... This file contains common functions (e.g. policy I/O, pattern matching). ... Since TOMOYO Linux is a name based access control, ... TOMOYO Linux's string manipulation functions make reviewers feel crazy, ... the Linux kernel accepts all characters but NUL character ...
    (Linux-Kernel)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)
  • Re: RfD: Escaped Strings
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... \b BS (backspace, ASCII 8) ... \ ** escapes to characters much as C does. ...
    (comp.lang.forth)
  • Re: A note on computing thugs and coding bums
    ... code is valid for any character set that is legal in C (which is a ... characters in the required source character set ... A String, in C Sharp or Java, can be redefined. ... allow programmers to handle some other data format, ...
    (comp.programming)