Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
905
UltraTextEditor
posted

how do I know is any character in UltraTextEditor?

for example:

user typed نام خانوادگی

and I want to know text that user typed begin with "نام" or not

  • 8607
    Offline posted

    Hello fatemeh,

    UltraTextEditor.Text property is a String type.  Because of this, you can use the .NET String.StartsWith method.

    For example:

    this.ultraTextEditor1.Text.StartsWith("e")

    Here is the MSDN link for that method.

    String.StartsWith

    If you need to determine if a character or string is in the text at all, you can use the Contains method.  You can also use IndexOf and compare the index if you need to determine if a character or string is located at a particular index.  However, if you just want to know if the text starts with a character, it's much easier to use StartsWith.


    Elizabeth Albert
    Localization Engineer