Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Français


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
Report an issue
<< isalphanum Chaînes de caractères isdigit >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:15:59 CEST 2024