TRIMWS-TrimleadingwhitespacefromastringNEWSTR=vlt.string.trimws(STR)Trimsleadingspacesfromastring.
Thereisprobablynoreasonforthisfunctiontoexist,astheMatlabfunctionSTRTRIMseemstoperformitsfunction.Thisfunctionisprovidedforbackwardcompatibility.IrecommendsimplyusingSTRTRIMratherthanthisfunction,asitwillprobablyberemovedinafuturerelease.
TheonlydifferencebetweenSTRTRIMandvlt.string.trimwsisthatvlt.string.trimwsonlyoperatesonleadingspaces,whereasSTRTRIMremovestrailingwhitespaceandalsooperatesonanywhitespacecharacterasdefinedbythefunctionISSPACE.
Example:
m=vlt.string.trimws(' this string has leading whitespace')Seealso:STRTRIM,ISSPACE