大脑52分区功能及位置_位置功能

大脑52分区功能及位置

The Pos function in Delphi returns an integer specifying the position of the first occurrence of one string within another.

Delphi中的Pos函数返回一个整数,该整数指定一个字符串在另一个字符串中首次出现的位置。

It's instantiated like this:

实例化如下:


Pos(String,Source);

它能做什么 ( What It Does )

Pos looks for the first complete occurrence of the specified String — generally offered literally, in single quotes — in Source. The Source is usually some variable. If Pos finds the string, it returns the character position in Source of the first character in Str as an integer value, otherwise it returns 0.

Pos在Source中寻找指定String的首次完整出现-通常按字面意义提供(单引号)。 Source通常是一些变量。 如果Pos找到了字符串,它将以整数值返回Str中第一个字符在Source中的字符位置,否则返回0。

The String and the Source must both be strings.

字符串和源都必须都是字符串。

( Example )


var s : string;
i : integer;
s:='DELPHI PROGRAMMING';
i:=Pos('HI PR',s);

In this example, the variable i will return the integer 5, because the specified string begins with the letter H, which is in the fifth position in Source.

在此示例中,变量i将返回整数5 ,因为指定的字符串以字母H开头,该字母在Source中的第五个位置。

翻译自: https://www.thoughtco.com/pos-function-4091945

大脑52分区功能及位置

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值