/// Checks if the input string is alphabetic.
/// </summary>
/// <param name="Text">The string to be checked.</param>
/// <returns>False if there are non-alphabetic characters.</returns>
public static bool IsAlphabetic(string Text)
{
int intIndex;
if(Text == "" || Text == null)
return (true);
char [] arrCharacter = Text.ToCharArray();
for(intIndex = 0; intIndex < arrCharacter.Length; intIndex++)
{
if(char.IsLetter(arrCharacter[intIndex]) == false && char.IsWhiteSpace(arrCharacter[intIndex]) == false)
return (false);
}
return (true);
}
No comments :
Post a Comment