开发者

Find character in string in Ada

开发者 https://www.devze.com 2022-12-21 07:07 出处:网络
Is there a simple way of checking whether a given charac开发者_运维百科ter is in a string? I know that if the string was simply a range (say \'a\'..\'z\') then I could have used the in operator, but I

Is there a simple way of checking whether a given charac开发者_运维百科ter is in a string?

I know that if the string was simply a range (say 'a'..'z') then I could have used the in operator, but I need something to the lines of char in "- _,.". What's the best way of doing so in Ada?


Use "Is_In" from the Ada.Strings.Maps package.

0

精彩评论

暂无评论...
验证码 换一张
取 消