string class : EndsWith(string) method

Description

It returns a boolean value that represents whether caller string ends with argument.

Syntax

stringInstance.EndsWith(string endString)

Arguments

ClassNameDescription
stringendStringAn end string.

Return value

ClassDescription
boolA boolean value that represents whether caller string ends with argument.

Sample code

1:

string str = "sample string";

2:

bool endWith = str.EndsWith("ring"); // The result (endWith) is true.

Notes

This method is a member introduced from the Rice ver 1.0.1.1.

It's a wrapper of the System.String.EndsWith(String).

If caller string ends with argument, it returns true. Otherwise, it returns false.

Links for reference

Copyright © Rice All rights reserved.