FUNCTION REFERENCE
insertBefore
Insert text before a pattern or position.
Insert text before a pattern or position.
Syntax
s = insertBefore(s,boundary,text)Inserts at every text match; absent boundaries leave the input unchanged. Numeric positions count UTF-16 code units; a position splitting a surrogate pair is unsupported.
Example
insertBefore("abc",2,"!")Differences from MATLAB: bounded 2-D string storage (65536 elements, 2 MiB text); MAT persistence and N-D strings are not implemented.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.