System::Globalization::CompareInfo::IsPrefix 方法

CompareInfo::IsPrefix(const String&, const String&) const method

检查指定字符串是否以指定前缀开头。

virtual bool System::Globalization::CompareInfo::IsPrefix(const String &source, const String &prefix) const
ParameterType描述
sourceconst String&源字符串。
prefixconst String&前缀字符串。

ReturnValue

如果字符串以该前缀开头则为 true;否则为 false。

另见

CompareInfo::IsPrefix(const String&, const String&, CompareOptions) const method

检查指定字符串是否以指定前缀开头,使用指定的比较选项。

virtual bool System::Globalization::CompareInfo::IsPrefix(const String &source, const String &prefix, CompareOptions options) const
ParameterType描述
sourceconst String&源字符串。
prefixconst String&前缀字符串。
选项CompareOptions比较选项。

ReturnValue

如果字符串以该前缀开头则为 true;否则为 false。

另见