code_junkie

Is there a way to see if a character is using 1 or 2 bytes in Delphi 2009?

Nov 11th, 2011
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. if ord(c) < 128 then
  2. // is an ascii character
  3.  
  4. function IsAnsi(const AString: string): Boolean;
  5. var
  6. tempansi : AnsiString;
  7. temp : string;
  8. begin
  9. tempansi := AnsiString(AString);
  10. temp := tempansi;
  11. Result := temp = AString;
  12. end;
Add Comment
Please, Sign In to add comment