Mathematica: String Manipulation

  

String Manipulation Mathematica Language Guide:

Structural Operations

StringJoin (<>) — join strings together

StringLength — length of a string

StringSplit — split a string at spaces or other delimiters

StringTake, StringDrop — take or drop parts of a string

StringPart — get one or more characters from specific positions in a string

String Patterns 

StringExpression — a symbolic string expression including symbolic string patterns

  • Longest
  • Shortest
  • Except
  • Whitespace
  • NumberString 

Operations on Strings

StringReplace — make replacements for string patterns

StringCases — find cases of string patterns

StringContainsQ — test whether a string contains a string pattern

  • StringCount 
  • StringPosition  
  • StringRepeat  
  • StringDelete 
  • Sort 
  • AlphabeticSort  
  • RemoveDiacritics

String Templating

StringTemplate — create a string template

<*…*> — expression for evaluation within a string template

`…` — slot for substitution

  • TemplateApply  
  • FileTemplateApply  

Text Construction 

  • StringRiffle  
  • StringPadLeft   
  • Pluralize 

 

Character-Oriented Operations 

Characters — break a string into a list of characters

  • ToUpperCase    
  • ToCharacterCode  
  • LetterQ  
  • Alphabet 

String Alignment & Comparison 

SequenceAlignment — find matching sequences in strings

Nearest — find strings nearest in edit distance

  • HammingDistance    
  • EditDistance   
  • LongestCommonSubsequence 

String Analysis

  • CharacterCounts   
  • TextWords   
  • DictionaryLookup   
  • WordCloud

String Semantics

ToString, ToExpression — convert between expressions and strings

Interpreter — interpret strings according to many type specifications

SemanticInterpretation — interpret strings semantically

ImportString, ExportString — translate strings in many file and other formats

  • "XML"    
  • "Table"  

TextString — give a textual version of any expression as a string

 

Systems-Related Operations 

  • Hash  
  • StringForm    
  • Compress    
  • Encrypt  

Operations on File Names

  • FileNameSplit   
  • FileNameTake    
  • FileBaseName    
  • ExpandFileName  

Operations on URLs

  • URLEncode   
  • URLDecode   
  • URLBuild    
  • URLParse

 

Referenced from: reference.wolfram.com

19583
12/21/2017 1:31:29 PM