On Jul 30, 8:22 pm, "axapta" <jas.jac...@gmail.comwrote:
Hi Group,
How can I check that the first 2 characters of a string are the percent (%)
sign?
string name = strSurname
Regards
You can get first two chars of a string with substring method like
below:
Dim foo As String = "foo"
'outputs "fo"
foo = foo.Substring(0, 2)
However, i'm not sure why you're looking for first 2 chars of the
string for determining if describes a percentage.
For example, you can use StartsWith("%") function depending on your
implementation of your application.
Thanks,
Onur