strshl.c
来自「[随书类]Dos6.0源代码」· C语言 代码 · 共 31 行
C
31 行
/***************************************************************************/
/* */
/* STRSHL.C */
/* */
/* Copyright (c) 1991 - Microsoft Corp. */
/* All rights reserved. */
/* Microsoft Confidential */
/* */
/* ShiftStringLeft() moves a string left one character, including EOL. */
/* Returns the length of the new string. */
/* */
/* unsigned ShiftStringLeft( char *String ) */
/* */
/* ARGUMENTS: String - pointer to string to be shifted */
/* RETURNS: unsigned - length of original string - 1 */
/* */
/* Created 03-23-89 - johnhe */
/***************************************************************************/
#include <stdio.h>
#include <string.h>
unsigned ShiftStringLeft( char *String )
{
unsigned Length;
if ( (Length = strlen(String)) != 0 )
memmove( String, String+1, Length-- );
return( Length );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?