www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/07/06:19:18

From: "Martin Ambuhl" <mambuhl AT tiac DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: help about string function!
Date: Tue, 7 Apr 1998 05:38:40 -0400
Organization: The Internet Access Company, Inc.
Lines: 17
Message-ID: <6gcs3a$sol@news-central.tiac.net>
References: <35298A36 DOT E265264D AT lasalle DOT edu DOT co>
NNTP-Posting-Host: p15.tc4.newyo.ny.tiac.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

MAPE. wrote in message <35298A36 DOT E265264D AT lasalle DOT edu DOT co>...
:Please, wich function in DJGPP is like the turbo C´s strset(char *s,
:char ch) ?


The Borland function
  char *strset(char *s, int ch)
sets all the members of the string s to be ch upto the already
existing '\0'.
Now, the number of characters before the '\0' is
   strlen(s)
So try:
#define strset(s,ch) memset((s),(ch),strlen(s))



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019