<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE> {The S-lang C Library Reference}: SLmake_nstring</TITLE> <LINK HREF="cref-89.html" REL=next> <LINK HREF="cref-87.html" REL=previous> <LINK HREF="cref.html#toc88" REL=contents> </HEAD> <BODY> <A HREF="cref-89.html">Next</A> <A HREF="cref-87.html">Previous</A> <A HREF="cref.html#toc88">Contents</A> <HR> <H2><A NAME="SLmake_nstring"></A> <A NAME="s88">88. <B>SLmake_nstring</B></A></H2> <P> <DL> <DT><B> Synopsis </B><DD><P>Duplicate a substring <DT><B> Usage </B><DD><P><CODE>char *SLmake_nstring (char *s, unsigned int n)</CODE> <DT><B> Description </B><DD><P>This function is like <CODE>SLmake_nstring</CODE> except that it creates a null terminated string formed from the first <CODE>n</CODE> characters of <CODE>s</CODE>. Upon failure, it returns <CODE>NULL</CODE>, otherwise it returns the new string. When nolonger needed, the returned string should be freed with either <CODE>free</CODE> or <CODE>SLfree</CODE>. <DT><B> See Also </B><DD><P><CODE>SLmake_nstring, SLfree, SLang_create_nslstring</CODE> </DL> <P> <P> <P> <HR> <A HREF="cref-89.html">Next</A> <A HREF="cref-87.html">Previous</A> <A HREF="cref.html#toc88">Contents</A> </BODY> </HTML>