Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語 - Русский
Aide de Scilab >> Chaînes de caractères > isascii

isascii

Tests if every character of given strings is 7-bit US-ASCII

Syntax

res = isascii(str)

Arguments

str

a character string or an array of integers.

res

a boolean matrix.

Description

res = isascii(str) returns %t (TRUE) if entries of str are a 7-bit US-ASCII character code between 0 and octal 0177 inclusive (or entries of str are 7-bit US-ASCII characters). Otherwise returns %f (FALSE).

Examples

isascii("Señor")

nt = ascii("Señor")
isascii(nt)

t = "We know that γ² = 1/(1-β²)";
isascii(t)
part(t, find(~isascii(t)))
--> isascii("Señor")
 ans  =
  T T F T T

--> nt = ascii("Señor")
 nt  =
   83.   101.   195.   177.   111.   114.

--> isascii(nt)
 ans  =
  T T F F T T


--> t = "We know that γ² = 1/(1-β²)";
--> isascii(t)
 ans  =
  T T T T T T T T T T T T T F F T T T T T T T T F F T

--> part(t, find(~isascii(t)))
 ans  =
  "γ²β²"

See also

  • ascii — string ASCII conversions
  • isalphanum — check that characters of a string are alphanumerics
  • isdigit — check that characters of a string are digits between 0 and 9
  • isletter — check that characters of a string are alphabetic letters
  • isnum — teste si une chaîne de caractères représente un nombre
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:33:08 CET 2022