导航:  String Procedures >

AfxStrRemain

上一页返回章节概述下一页

描述

 

返回字符串或字符串列表的第一次出现后的字符串的一部分.此函数区分大小写.

 

FreeBASIC 语法

 

FUNCTION AfxStrRemain ( _

  BYREF wszMainStr AS WSTRING, _

  BYREF wszMatchStr AS WSTRING, _

  BYVAL nStart AS LONG = 1 _

) AS CWSTR

 

FUNCTION AfxStrRemainAny ( _

  BYREF wszMainStr AS WSTRING, _

  BYREF wszMatchStr AS WSTRING, _

  BYVAL nStart AS LONG = 1 _

) AS CWSTR

 

参数

 

wszMainStr

 

[in]主串.

 

wszMatchStr

 

[in]字符串或字符搜索.

 

nStart

 

[in]可选的起始位置开始搜索.如果没有指定nStart,搜索将在位置1开始.如果nStart是零,一个空字符串返回.如果nStart是负的,起始位置是从右往左数:1的最后一个字符,2的倒数第二,等.

 

用法示例

 

DIM cws AS CWSTR = AfxStrRemain("Brevity is the soul of wit", "is ")   ' Returns "the soul of wit"

DIM cws AS CWSTR = AfxStrRemainAny("I think, therefore I am", ",")   ' Returns "therefore I am"

 

引用文件

 

AfxStr.inc