Navigation

Operators and Keywords

Function List:

C++ API

test_string.m File Reference


Functions

id x ()
 !if (strcmp("\a", setstr(x)))%!printf_assert("ok\n")
!endif !assert (prog_output_assert("ok"))
 !if (strcmp("\b", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\f", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\n", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\r", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\t", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\v", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\\", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\'", setstr(x)))%!printf_assert("ok\n")
 !if (strcmp("\"", setstr(x)))%!printf_assert("ok\n")
 !fail ('strcmp("\x", setstr(x))',"warning",".*unrecognized escape sequence.*")
 !if (strcmp("\a\b\f\n\r\t\v\\\'\"", setstr(x)))%!printf_assert("ok\n")
id string_fill_char ()
 !assert (str,["theseXX";"areXXXX";"strings"])
!(ischar(1 assert ()
id test () = ndgrid(0:2)
 !assert (!(ischar(s)))
id ischar ()
strcmp(char([65, 83, 67, 73, 73] ASCII ()
id char ()
 !assert ((strcmp(x(1,:),"foo ")%!&&strcmp(x(2,:),"bar ")%!&&strcmp(x(3,:),"foobar")))
"fooba","foobar" strcmp ()
strcmp(undo_string_escapes("abc\a\b\n\r\t\v\f123" f123 ()
id undo_string_escapes ()
0:127 setstr ()
 !assert (all(toascii(charset)==result))
1, 2 toascii ()
 !result ((toascii("A"):toascii("Z"))+1)%!
 !assert (all(tolower(charset)==result))
1, 2 tolower ()
 !result ((toascii("a"):toascii("z"))+1)%!
 !assert (all(toupper(charset)==result))
1, 2 toupper ()
 !result ((toascii("0"):toascii("9"))+1)
 !assert (all(isalnum(charset)==result))
1, 2 isalnum ()
 !assert (all(isalpha(charset)==result))
1, 2 isalpha ()
 !assert (all(isascii(charset)==result))
1, 2 isascii ()
 !result (1:32)
 !result (128)
 !assert (all(iscntrl(charset)==result))
1, 2 iscntrl ()
 !assert (all(isdigit(charset)==result))
1, 2 isdigit ()
 !result (34:127)
 !assert (all(isgraph(charset)==result))
1, 2 isgraph ()
 !assert (all(islower(charset)==result))
1, 2 islower ()
 !result (33:127)
 !if (ispc()&&!isunix())%!result(10)
!endif !assert (all(isprint(charset)==result))
1, 2 isprint ()
 !result (34:48)
 !result (59:65)
 !result (92:97)
 !result (124:127)
 !assert (all(ispunct(charset)==result))
1, 2 ispunct ()
 !result (toascii(" \f\n\r\t\v")+1)
 !assert (all(isspace(charset)==result))
1, 2 isspace ()
 !assert (all(isupper(charset)==result))
1, 2 isupper ()
 !result ((toascii("A"):toascii("F"))+1)
 !result ((toascii("a"):toascii("f"))+1)
 !assert (all(isxdigit(charset)==result))
1, 2 isxdigit ()
test concatenation with all
zero matrices 
!assert ([ ''65 *ones(1, 10)], 'AAAAAAAAAA')

Variables

 !string_fill_char = "X"
 !str = ["these"
 are
 strings
 !result = 0:127

Function Documentation

test concatenation with all zero matrices !assert ( 'AAAAAAAAAA'   ) 

!assert ( all(isxdigit(charset)==result)   ) 

!assert ( all(isupper(charset)==result)   ) 

!assert ( all(isspace(charset)==result)   ) 

!assert ( all(ispunct(charset)==result)   ) 

! endif !assert ( all(isprint(charset)==result)   ) 

!assert ( all(islower(charset)==result)   ) 

!assert ( all(isgraph(charset)==result)   ) 

!assert ( all(isdigit(charset)==result)   ) 

!assert ( all(iscntrl(charset)==result)   ) 

!assert ( all(isascii(charset)==result)   ) 

!assert ( all(isalpha(charset)==result)   ) 

!assert ( all(isalnum(charset)==result)   ) 

!assert ( all(toupper(charset)==result)   ) 

!assert ( all(tolower(charset)==result)   ) 

!assert ( all(toascii(charset)==result)   ) 

!assert ( (strcmp(x(1,:),"foo ")%!&&strcmp(x(2,:),"bar ")%!&&strcmp(x(3,:),"foobar"))   ) 

!assert ( ischar(s)  ) 

!assert ( str   ) 

! endif !assert ( prog_output_assert("ok")   ) 

!fail ( 'strcmp("\x", setstr(x))'  ,
"warning"  ,
".*unrecognized escape sequence.*"   
)

!if ( ispc()&&!isunix()   ) 

!if ( strcmp("\a\b\f\n\r\t\v\\\'\"", setstr(x))   ) 

!if ( strcmp("\"", setstr(x))   ) 

!if ( strcmp("\'", setstr(x))   ) 

!if ( strcmp("\\", setstr(x))   ) 

!if ( strcmp("\v", setstr(x))   ) 

!if ( strcmp("\t", setstr(x))   ) 

!if ( strcmp("\r", setstr(x))   ) 

!if ( strcmp("\n", setstr(x))   ) 

!if ( strcmp("\f", setstr(x))   ) 

!if ( strcmp("\b", setstr(x))   ) 

!if ( strcmp("\a", setstr(x))   ) 

!result ( (toascii("a"):toascii("f"))+  1  ) 

!result ( (toascii("A"):toascii("F"))+  1  ) 

!result ( toascii(" \f\n\r\t\v")+  1  ) 

!result ( 124:127   ) 

!result ( 92:97   ) 

!result ( 59:65   ) 

!result ( 34:48   ) 

!result ( 33:127   ) 

!result ( 34:127   ) 

!result ( 128   ) 

!result ( 1:32   ) 

!result ( (toascii("0"):toascii("9"))+  1  ) 

!result ( (toascii("a"):toascii("z"))+  1  ) 

!result ( (toascii("A"):toascii("Z"))+  1  ) 

strcmp (char ([65, 83, 67, 73, 73] ASCII (  )  [virtual]

!(ischar (1 assert (  )  [virtual]

foo bar foobar char (  )  [virtual]

strcmp (undo_string_escapes ("abc\a\b\n\r\t\v\f123" f123 (  )  [virtual]

id isalnum (  )  [virtual]

id isalpha (  )  [virtual]

id isascii (  )  [virtual]

id ischar (  )  [virtual]

id iscntrl (  )  [virtual]

id isdigit (  )  [virtual]

id isgraph (  )  [virtual]

id islower (  )  [virtual]

id isprint (  )  [virtual]

id ispunct (  )  [virtual]

id isspace (  )  [virtual]

id isupper (  )  [virtual]

id isxdigit (  )  [virtual]

: setstr (  )  [virtual]

foo bar strcmp (  )  [virtual]

id string_fill_char (  )  [virtual]

f f test (  )  = ndgrid(0:2) [virtual]

toascii (  )  [virtual]

tolower (  )  [virtual]

toupper (  )  [virtual]

string undo_string_escapes (  )  [virtual]

id x (  )  [virtual]


Variable Documentation

!result = 0:127

!str = ["these"

!string_fill_char = "X"

are