Location: PHPKode > projects > Moc10 PHP Library > docs/api-docs/Moc10_String/Moc10_String.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Moc10_String</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Moc10_String</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Moc10_String</p>
	<ul class="tags">
				<li><span class="field">author:</span> Nick Sagona, III &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
				<li><span class="field">version:</span> 1.9.7</li>
				<li><span class="field">copyright:</span> Copyright (c) 2009-2011 Moc 10 Media, LLC. (http://www.moc10media.com)</li>
				<li><span class="field">license:</span> <a href="http://www.moc10phplibrary.com/LICENSE.TXT">New BSD License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_String.php.html">/String.php</a> (line <span class="field">33</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_string" title="details" class="var-name">$_string</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																										
				<div class="method-definition">
					static 						<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#setString" title="details" class="method-name">setString</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$str</span>)
									</div>
																																																																																																										
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$str</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#add" title="details" class="method-name">add</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#between" title="details" class="method-name">between</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$start</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$end</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#br" title="details" class="method-name">br</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#date" title="details" class="method-name">date</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$format</span> = <span class="var-default">'m/d/Y'</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#dehtml" title="details" class="method-name">dehtml</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#escape" title="details" class="method-name">escape</a>
											([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$all</span> = <span class="var-default">false</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#glue" title="details" class="method-name">glue</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$ary</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$delimiter</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#html" title="details" class="method-name">html</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#ipos" title="details" class="method-name">ipos</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$char</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$offset</span> = <span class="var-default">0</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#ireplace" title="details" class="method-name">ireplace</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$search</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$replace</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#length" title="details" class="method-name">length</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#links" title="details" class="method-name">links</a>
											([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$tar</span> = <span class="var-default">false</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#lower" title="details" class="method-name">lower</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#pos" title="details" class="method-name">pos</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$char</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$offset</span> = <span class="var-default">0</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#preg" title="details" class="method-name">preg</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$pattern</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$replace</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#random" title="details" class="method-name">random</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$len</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$caps</span> = <span class="var-default">false</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#replace" title="details" class="method-name">replace</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$search</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$replace</span>)
									</div>
																						
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#slug" title="details" class="method-name">slug</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$sep</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#split" title="details" class="method-name">split</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$delimiter</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#strip" title="details" class="method-name">strip</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#striptags" title="details" class="method-name">striptags</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$allowed</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#sub" title="details" class="method-name">sub</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$start</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$len</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#trim" title="details" class="method-name">trim</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$chars</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#upper" title="details" class="method-name">upper</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#upperall" title="details" class="method-name">upperall</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#upperfirst" title="details" class="method-name">upperfirst</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
										<a href="#wrap" title="details" class="method-name">wrap</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$len</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$delimiter</span> = <span class="var-default">&quot;\n&quot;</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$cut</span> = <span class="var-default">false</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#__toString" title="details" class="method-name">__toString</a>
										()
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$_string" id="$_string"><!-- --></a>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_string</span>
						(line <span class="line-number">40</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">String property</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<a name='method_detail'></a>
<a name="methodsetString" id="setString"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static setString</span> (line <span class="line-number">76</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Static method to instantiate the string object and return itself  to facilitate chaining methods together.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			setString
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$str</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$str</span>			</li>
				</ul>
		
			
	</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">49</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description">Instantiate the string object.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$str</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$str</span>			</li>
				</ul>
		
			
	</div>
<a name="methodadd" id="add"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">add</span> (line <span class="line-number">311</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to add slashes to the string and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			add
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodbetween" id="between"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">between</span> (line <span class="line-number">231</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return a substring of the string between two delimiters.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			between
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$start</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$end</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$start</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$end</span>			</li>
				</ul>
		
			
	</div>
<a name="methodbr" id="br"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">br</span> (line <span class="line-number">381</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert newlines in the string to <br /> tags and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			br
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoddate" id="date"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">date</span> (line <span class="line-number">515</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return a date-formatted string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			date
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$format</span> = <span class="var-default">'m/d/Y'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$format</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddehtml" id="dehtml"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">dehtml</span> (line <span class="line-number">426</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert formatted HTML entities in the string back into special characters and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			dehtml
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodescape" id="escape"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">escape</span> (line <span class="line-number">356</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to simulate escaping a string for DB entry, much like mysql_real_escape_string(), but without requiring a DB connection.</p>
<p class="description">The parameter $all is boolean flag that, when set to true, causes the '%' and '_' characters to be escaped as well.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			escape
		</span>
					([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$all</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$all</span>			</li>
				</ul>
		
			
	</div>
<a name="methodglue" id="glue"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">glue</span> (line <span class="line-number">143</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to glue an array of parts togeter into a string based on the delimiter.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			glue
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$ary</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$delimiter</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$ary</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$delimiter</span>			</li>
				</ul>
		
			
	</div>
<a name="methodhtml" id="html"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">html</span> (line <span class="line-number">412</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert special characters in the string to properly formatted HTML entities and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			html
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodipos" id="ipos"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">ipos</span> (line <span class="line-number">116</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return the position of the case-insensitive character(s) in the string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			ipos
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$char</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$offset</span> = <span class="var-default">0</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$char</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$offset</span>			</li>
				</ul>
		
			
	</div>
<a name="methodireplace" id="ireplace"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">ireplace</span> (line <span class="line-number">266</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to replace (case-insensitive) the substring using what was passed as an argument and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			ireplace
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$search</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$replace</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$search</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$replace</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlength" id="length"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">length</span> (line <span class="line-number">88</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return the length of the string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			length
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodlinks" id="links"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">links</span> (line <span class="line-number">493</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert any links in the string to clickable HTML links.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			links
		</span>
					([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$tar</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$tar</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlower" id="lower"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">lower</span> (line <span class="line-number">157</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert the string to all lowercase and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			lower
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodpos" id="pos"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">pos</span> (line <span class="line-number">102</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return the position of the character(s) in the string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			pos
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$char</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$offset</span> = <span class="var-default">0</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$char</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$offset</span>			</li>
				</ul>
		
			
	</div>
<a name="methodpreg" id="preg"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">preg</span> (line <span class="line-number">282</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to preg_replace the substring using what was passed as an argument and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			preg
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$pattern</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$replace</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$pattern</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$replace</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrandom" id="random"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">random</span> (line <span class="line-number">531</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to generate a random alphanumeric string of a predefined length.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			random
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$len</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$caps</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$len</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$caps</span>			</li>
				</ul>
		
			
	</div>
<a name="methodreplace" id="replace"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">replace</span> (line <span class="line-number">250</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to replace the substring that was passed as an argument and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			replace
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$search</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$replace</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$search</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$replace</span>			</li>
				</ul>
		
			
	</div>
<a name="methodslug" id="slug"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">slug</span> (line <span class="line-number">441</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert the string into an SEO-friendly slug.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			slug
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$sep</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sep</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsplit" id="split"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">split</span> (line <span class="line-number">129</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return an array of parts of the string based on the delimiter.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			split
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$delimiter</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$delimiter</span>			</li>
				</ul>
		
			
	</div>
<a name="methodstrip" id="strip"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">strip</span> (line <span class="line-number">325</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to strip slashes from the string and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			strip
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodstriptags" id="striptags"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">striptags</span> (line <span class="line-number">340</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to strip HTML tags from the string and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			striptags
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$allowed</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$allowed</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsub" id="sub"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">sub</span> (line <span class="line-number">215</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return a substring of the string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			sub
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$start</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$len</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$start</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$len</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtrim" id="trim"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">trim</span> (line <span class="line-number">297</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to trim the whitespace at the beginning and end of the string and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			trim
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$chars</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$chars</span>			</li>
				</ul>
		
			
	</div>
<a name="methodupper" id="upper"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">upper</span> (line <span class="line-number">171</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert the first letter of each word in the string to uppercase and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			upper
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodupperall" id="upperall"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">upperall</span> (line <span class="line-number">185</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert the string to all uppercase and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			upperall
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodupperfirst" id="upperfirst"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">upperfirst</span> (line <span class="line-number">199</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to convert the first letter of a string to uppercase and return the newly edited string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			upperfirst
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodwrap" id="wrap"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">wrap</span> (line <span class="line-number">398</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to perform a word wrap on a string.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Moc10_String/Moc10_String.html">Moc10_String</a></span>
		<span class="method-name">
			wrap
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$len</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$delimiter</span> = <span class="var-default">&quot;\n&quot;</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$cut</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$len</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$delimiter</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$cut</span>			</li>
				</ul>
		
			
	</div>
<a name="method__toString" id="__toString"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__toString</span> (line <span class="line-number">62</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to return the string value for printing output.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			__toString
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 12 Jan 2011 01:17:45 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>
Return current item: Moc10 PHP Library