Navigation

Operators and Keywords

Function List:

C++ API

strjust.m File Reference


Functions

endif if (nargin==1) just
 if (!isempty(idx)) x(idx)
 if (strcmp(just,"right"))[N
 elseif (strcmp(just,"left"))[N
endfunction!error< Invalid
call to strjust > 
strjust ()
!error< Invalid call to strjust > strjust (["a";"ab"],"center", 1)
 !assert (strjust(["a";"ab";"abc";"abcd"]),%![" a";" ab";" abc";"abcd"])
 !assert (strjust(["a";"ab";"abc";"abcd"],"center"),%![" a ";" ab";"abc ";"abcd"])

Variables

function x
endif just = tolower (just)
 idx = find (toascii (x) == 0)
 endif [nr, nc] = size (x)
 hi = max (cumsum (idx))
 shift = hi
 lo = max (cumsum (flipud (idx)))
 else [N, hi] = max (cumsum (idx))

Function Documentation

!assert ( strjust(["a";"ab";"abc";"abcd"],"center")  ,
%!  [" a ";" ab";"abc ";"abcd"] 
)

!assert ( strjust(["a";"ab";"abc";"abcd"])  ,
%!  [" a";" ab";" abc";"abcd"] 
)

elseif ( strcmp(just,"left")   ) 

if ( strcmp(just,"right")   ) 

if ( isemptyidx  ) 

endif if ( nargin  = =1  ) 

!error<Invalid call to strjust> strjust ( "center"  ,
 
)

endfunction !error<Invalid call to strjust> strjust (  ) 


Variable Documentation

else[N, hi] = max (cumsum (idx))

endif[nr, nc] = size (x)

hi = max (cumsum (idx))

endif idx = find (toascii (x) == 0)

endif just = tolower (just)

lo = max (cumsum (flipud (idx)))

shift = hi

x

Initial value:

 strjust (x, just)

  if (nargin < 1 || nargin > 2)
    print_usage ()