StringPadLeft
StringPadLeft["string",n]
makes string be of length n, padding it on the left with spaces or truncating it if necessary.
StringPadLeft["string",n,"padding"]
pads by repeating copies of the string padding.
StringPadLeft[{"s1","s2",…}]
pads strings with spaces on the left to make them all the same length.
StringPadLeft[{"s1","s2",…},n,…]
pads or truncates to make all strings of length n.
Details
- StringPadLeft effectively places repeated copies of padding to the left of string, truncating them when a total width of n characters has been achieved.
- StringPadLeft[BioSequence["type","seq"],n,…] will apply the operation to the string "seq", yielding a BioSequence result.
- The following letter is used as the default padding for each type of biomolecular sequence if not otherwise specified:
-
"DNA" or "CircularDNA" N "RNA" N "Peptide" X
Examples
open allclose allBasic Examples (4)
Text
Wolfram Research (2015), StringPadLeft, Wolfram Language function, https://reference.wolfram.com/language/ref/StringPadLeft.html (updated 2020).
CMS
Wolfram Language. 2015. "StringPadLeft." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/StringPadLeft.html.
APA
Wolfram Language. (2015). StringPadLeft. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StringPadLeft.html