append — Append text inputs elementwise.
s = append(arg1, ...) combines string arrays, character vectors, or cell arrays of character vectors elementwise. A string input selects string output; otherwise a cell input selects cellstr output; otherwise all-character-vector input produces a character vector.
Syntax
s = append(arg1, ...)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
arg | Any | Variadic | — | Values to append. |
Returns
| Name | Type | Description |
|---|---|---|
out | Any | Output value. |
How append works
- Inputs are string arrays, character vectors, or cell arrays of character vectors.
- If any input is a string array, the output is a string array. Otherwise, if any input is a cell array, the output is a cell array of character vectors. If all inputs are character vectors, the output is a character vector.
- String arrays and cell arrays use compatible-size implicit expansion; a character vector is compatible with every other input size.
- Trailing whitespace in every supported text representation is preserved.
- Numeric, logical, and integer inputs reject rather than undergoing implicit text conversion. This includes all eight integer classes in scalar and array form.
- Resident numeric handles reject before provider dispatch or gather; append has no interactive GPU-array or integer-output surface.
Examples
Using append with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how append changes the result.
Run a small append example, explain the result, then change one input and compare the output.
Related Strings functions
Transform
deblank · erase · eraseBetween · erasePunctuation · eraseURLs · extractAfter · extractBefore · extractBetween · insertAfter · insertBefore · join · lower · pad · replace · replaceBetween · reverse · split · splitlines · strcat · strip · strjoin · strjust · strrep · strsplit · strtrim · upper
Text Analytics
addDependencyDetails · addEntityDetails · addLemmaDetails · addPartOfSpeechDetails · addSentenceDetails · addTypeDetails · bagOfNgrams · bagOfWords · cosineSimilarity · doc2sequence · encode · extractFileText · extractHTMLText · fastTextWordEmbedding · findElement · getAttribute · htmlTree · ind2word · isVocabularyWord · normalizeWords · readWordEmbedding · removeLongWords · removeShortWords · removeStopWords · removeWords · stopWords · tokenDetails · tokenizedDocument · trainWordEmbedding · vaderSentimentScores · vec2word · word2ind · word2vec · wordEncoding · writeWordEmbedding
Core
blanks · char · compose · convertCharsToStrings · convertContainedStringsToChars · convertStringsToChars · genvarname · int2str · isletter · isspace · isStringScalar · isstrprop · mat2str · native2unicode · newline · num2str · sprintf · sscanf · str2double · str2num · strcmp · strcmpi · string · string.empty · strings · strlength · strncmp · strncmpi · strtok · unicode2native
Search
contains · endsWith · matches · startsWith · strfind
Pattern
digitsPattern · lettersPattern · pattern · regexpPattern · textBoundary · wildcardPattern
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how append is executed, line by line, in Rust.
- View the source for append in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.