<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="jit.str.op" module="jit" category="Jitter Strings">
	<digest>
		Apply common string operations
	</digest>
	<description>
		Use the <o>jit.str.op</o> object to perform common string operations on string matrices.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
		<metadata name="tag">
			Jitter Strings
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="matrix">
			<digest>
				in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="matrix">
			<digest>
				in2
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="matrix">
			<digest>
				out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="matrix">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MOP-->
	<mop matrixinputcount="2" matrixoutputcount="1">
		<matrixinput name="in2" planelink="0" typelink="0" dimlink="0" minplanecount="1" maxplanecount="1" mindimcount="1" maxdimcount="2" ioproc="adapt">
			<types>
				char
			</types>
		</matrixinput>
		<matrixoutput name="out" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="1" mindimcount="1" maxdimcount="2">
			<types>
				char
			</types>
		</matrixoutput>
	</mop>
	<!--MESSAGES-->
	<jittermethodlist>
		<jittermethod name="bang" />
		<jittermethod name="clear" />
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="importattrs" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="outputmatrix" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="end" get="1" set="1" type="int" size="2">
			<digest>
				End of the slice (in slice mode)
			</digest>
			<description>
				The end of the slice when in <m>slice</m> mode (default = 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="End" />
			</attributelist>
		</attribute>
		<attribute name="multiline_in" get="1" set="1" type="int" size="1">
			<digest>
				Enable 2D matrix input
			</digest>
			<description>
				Enables the <o>jit.str.op</o> object to work with 2D matrices, with each row interpreted as a CR-terminated string. If disabled, only the first row of an incoming 2D matrix is used. (default = 1)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Multiline In" />
			</attributelist>
		</attribute>
		<attribute name="multiline_out" get="1" set="1" type="int" size="1">
			<digest>
				Convert carriage returns to new rows in a 2D output matrix
			</digest>
			<description>
				Causes the <o>jit.str.op</o> object to convert any CR to the start of a new row in a 2D output matrix and output an 'expanded' 2D matrix. If disabled, a 'collapsed', single-row matrix is output. (default = 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Multiline Out" />
			</attributelist>
		</attribute>
		<attribute name="op" get="1" set="1" type="symbol" size="1">
			<digest>
				String operation mode
			</digest>
			<description>
				String operation mode (default = strcat) Available modes are:
				<br />
				strcat = Concatenate two strings
				<br />
				strrev = Reverse a string
				<br />
				slice = Output an arbitrary substring as a zero-terminated string
				<br />
				strcmp = Compare two strings lexicographically, returning the difference between the two characters at the point that the strings become dissimilar, as well as the index of that point
				<br />
				strlen = Report the length of a string
				<br />
				toupper = Convert to uppercase
				<br />
				tolower = Convert to lowercase
				<br />
				thru = Properly truncate (if necessary) and terminate string matrix
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Op" />
			</attributelist>
		</attribute>
		<attribute name="start" get="1" set="1" type="int" size="2">
			<digest>
				Start of the slice (in slice mode)
			</digest>
			<description>
				The start of the slice when in <m>slice</m> mode (default = 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Start" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist>
		<jitterattribute name="outputmode" />
		<jitterattribute name="adapt" />
		<jitterattribute name="in2_name" />
		<jitterattribute name="in2_type" />
		<jitterattribute name="in2_dim" />
		<jitterattribute name="in2_planecount" />
		<jitterattribute name="out_name" />
		<jitterattribute name="type" />
		<jitterattribute name="dim" />
		<jitterattribute name="planecount" />
	</jitterattributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="jit.str.op.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.op">
			Apply binary or unary operators
		</seealso>
		<seealso name="jit.str.fromsymbol">
			Convert Max symbol to Jitter string matrix
		</seealso>
		<seealso name="jit.str.tosymbol">
			Convert Jitter string matrix to Max symbol
		</seealso>
		<seealso name="jit.str.regexp">
			Use PERL-compatible regular expressions on Jitter matrices
		</seealso>
		<seealso name="jit.textfile">
			Read and write a matrix as an ASCII text file
		</seealso>
	</seealsolist>
	<discussion>
		<p>
			A word on Jitter strings: In Jitter, any 1 plane char matrix may be manipulated as a string. String matrices may have one or two dimensions. If 1-dimensional, the string is considered terminated at the first 0 (like in C). If 2-dimensional, the string may be considered a multi-line string, with the first 0 encountered on each row treated as a carriage return. The jit.textfile and jit.str.op objects will accept and output 2D matrices. jit.str.fromsymbol only outputs 1D matrices and jit.str.tosymbol only accepts 1D matrices (or the first row of a 2D matrix).
		</p>
		<p>
			Most operations input and output a single string matrix. The <m>strcat</m> operation (which concatenates strings) and the <m>strcmp</m> operation (which compares strings) take two input matrices.
		</p>
	</discussion>
</c74object>
