IRAF help page for package language, program strings

from NOAO strings -- string manipulation functions available in the CLUSAGEDESCRIPTIONEXAMPLESSEE ALSO

strings -- string manipulation functions available in the CL


USAGE

str    (x)
substr (str, start, end)
stridx (test, str)
strlen (str)

DESCRIPTION

DESCRIPTION The following functions are available for the manipulation of strings within the CL.

str (x)

Converts its argument into a string. The argument may be boolean, integer or real.

substr (str, first, last)

Extracts a substring from string str. The first character in the string is at index 1.

stridx (test, str)

Finds the position of the first occurence of any character found in test in the string str, returning 0 if the match fails.

strlen (str)

Returns the current length of a string. Note that the maximum length may be obtained as the value of the expression `param.p_length'.


EXAMPLES

1. Simple function calls.

	s = str(y)			# convert y to a string.
	s = substr ("abcdefg", 2, 4)	# s = "bcd"
	i = stridx ("abc", " eeboq")	# i = 4
	i = strlen ("abc")		# i = 3

SEE ALSO

SEE ALSO, scan, radix,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu