📄 string_insert.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"><html>
<HEAD>
<META content="text/html; charset=unicode" http-equiv=Content-Type><TITLE>SQLAPI++ Library - Online Documentation - SAString::Insert</TITLE>
<meta name="KEYWORDS" content="
library, C++,
Oracle, SQLServer, DB2, Sybase, Informix, InterBase, SQLBase, ODBC,
SQL, server, client, database, programming, development, software,
Win32, Windows, Linux, Unix, Solaris,
Microsoft, Borland, Centura, Gupta, IBM"><HTML>
<HEAD><TITLE></TITLE></HEAD>
<body BACKGROUND="../images/bg.gif" text=
"#000000" bgColor
=
#ffffff><!--GlbHdr--> <table WIDTH="600" height="40" frame="hsides" BORDER="2" BORDERCOLOR="#004fcd" align="right" cellpadding="0" cellspacing="2" id="TABLE1">
<tr><!--class="GlbDefault"-->
<td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/index.html" style="TEXT-DECORATION: none">
<font color="white" size="3" face="sans-serif">
<b>Home</b></font></A></td></TD>
<td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/HowTo/index.html" style="TEXT-DECORATION: none"> <font color="white" size="3" face="sans-serif">
<b>How To</b></font></A></td><!--class="GlbActive"-->
<td width="70" bgcolor="#00bb00" bordercolor="black" align="middle"><A href="/OnLineDoc/index.html" style="TEXT-DECORATION: none"> <font color="white" size="3" face="sans-serif">
<b>Online Documentation</b></font></A></td><!--class="GlbDefault"-->
<td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/Support/index.html" style="TEXT-DECORATION: none"> <font color="white" size="3" face="sans-serif">
<b>Support</b></font></A></td>
<td width=70 bgcolor=#000094 bordercolor=black align=middle><A href="/Download/index.html" style="TEXT-DECORATION: none" >
<font color=white size=3 face=sans-serif>
<b>Download</b></font></A></td>
<td width="70" bgcolor="#000094" bordercolor="black" align="middle"><A href="/Order/index.html" style="TEXT-DECORATION: none"> <font color="white" size="3" face="sans-serif">
<b>Order</b></font></A></td> </tr>
</table>
<p> </p>
<p> </p>
<table width="100%">
<tr>
<td valign="top" width="165"><!--LeftMenu-->
<table frame="void" CELLSPACING="5" width="165">
<tr><td><p> </p></td>
</tr>
<tr>
<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"> <A href="Command.html" style="TEXT-DECORATION: none">
<font color="white" size="2" face="sans-serif">
SACommand</A> </FONT> </td>
</tr>
<tr>
<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"> <A href="Connection.html" style="TEXT-DECORATION: none">
<font color="white" size="2" face="sans-serif">
SAConnection</A> </FONT> </td>
</tr>
<tr>
<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"> <A href="Exception.html" style="TEXT-DECORATION: none">
<font color="white" size="2" face="sans-serif">
SAException</font></A> </td>
</tr>
<tr>
<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"> <A href="Field.html" style="TEXT-DECORATION: none">
<font color="white" size="2" face="sans-serif">
SAField</A> </FONT> </td>
</tr>
<tr>
<td><img align="middle" src="../images/green.gif" WIDTH="12" HEIGHT="12"> <A href="Param.html" style="TEXT-DECORATION: none">
<font color="white" size="2" face="sans-serif">
SAParam</A> </FONT> </td>
</tr>
<tr><td><hr></td></tr>
<tr>
<td><img align=middle src="../images/red.gif" WIDTH="12" HEIGHT="12"> <A href="String.html" style ="TEXT-DECORATION: none" >
<font color=white size=2 face=sans-serif>
SAString</A> </FONT> </td>
</tr>
<tr>
<td><img align=middle src="../images/green.gif" WIDTH="12" HEIGHT="12"> <A href="DateTime.html" style ="TEXT-DECORATION: none" >
<font color=white size=2 face=sans-serif>
SADateTime</A> </FONT> </td>
</tr>
</table>
</td><!--empty column-->
<td width="20">
<p> </p>
</td><!--Content-->
<td valign="top" align="left">
<table width="100%" cellspacing="2" cellpadding="2">
<tr>
<td align="left"> <A href="String_Usage.html" style="TEXT-DECORATION: none"><h3>Usage</h3></A>
</td>
<td align="left"> <A href="String.html" style="TEXT-DECORATION: none"><h3>Class Members</h3></A>
</td>
<td align="left"> <A href="String_Examples.html" style="TEXT-DECORATION: none"><h3>Examples</h3></A>
</td>
</tr>
<tr>
<td colspan="3"><h1>SAString::Insert</h1></td>
</tr>
</table>
<p><font face="Arial"><b>int Insert( int</b>
nIndex<b>, SAChar</b>
ch<b> );</b></font></p>
<p><font face="Arial"><b> int Insert( int</b>
nIndex<b>, const SAChar *</b>pstr<b>
);</b></font></p>
<h3>Return value</h3>
<P>Returns the length of the changed string.
<h3>Parameters</h3>
<P class=dt><I>nIndex. </I>The index of the
character before which the insertion will take place.</P>
<P class=dt><I>ch. </I>The character to be
inserted.</P>
<P class=dt><I>pstr. </I>A pointer to the substring
to be inserted.</P>
<h3>Remarks</h3>
<p> Call this member function to insert a single
character or a substring at the given index within the string. The
<I>nIndex</I> parameter identifies the first character that will be
moved to make room for the character or substring. If <I>nIndex</I>
is zero, the insertion will occur before the entire string. If
<I>nIndex</I> is higher than the length of the string, the function
will concatenate the present string and the new material provided by
either <I>ch</I> or <I>pstr</I>.
</p>
<h3>Server specific notes</h3>
<P>No specific information.</P>
<H3>See also</H3>
<P><A href="String_Delete.html">Delete</A>, <A
href="String_operator_concat_eq.html">operator +=</A>, <A
href="String_operator_concat.html">operator +</A> </P>
<h3>Problems and Questions</h3>
<p> If
you don't find the answer to you questions or
have some problems on using the Library, please, send e-mail to <A href="mailto:howto@sqlapi.com">howto@sqlapi.com</A>.
</p>
</td>
<tr></tr>
</table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -