Garry's Mod Wiki

Revision Difference

string.Trim#511932

<function name="Trim" parent="string" type="libraryfunc">⤶ <description>Removes leading and trailing matches of a string.</description>⤶ <realm>Shared and Menu</realm>⤶ <file line="245">lua/includes/extensions/string.lua</file>⤶ <args>⤶ <arg name="Inputstring" type="string">The string to trim.</arg>⤶ <arg name="Char" type="string" default="">String to match.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="string">Modified string</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Demonstrates the use of string.Trim without second argument.</description>⤶ <code>MsgN(string.Trim(" hi whatsup "))</code>⤶ <output>"hi whatsup"</output>⤶ ⤶ </example>