Meet us at at Real World in Orlando, Florida.
All functions
Mac OS X
Windows
Crossplatform
Components
Guides
New in version:
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
String.WriteTextFile
Component: String
Version: 2.4
Mac OS X: Works
Windows: Works
MBS( "String.WriteTextFile"; Text; FilePath; Encoding )
Parameters
| Parameter | Description | Example value |
|---|---|---|
| Text | The text to save. | "Hello World" |
| FilePath | The native file path. Something like "/Users/cs/desktop/test.txt" on Mac and "C:\Programs\Data\test.txt" on Windows. Files without path end in the root directory on Mac. | "test.txt" |
| encoding | Optional. Default is native. Can be one of the following strings: ansi, windows, mac, latin1, utf8. |
Result
Returns "OK" or an error message.
Description
Writes a text file with the given text.You have to decide which encoding to use (if not native). We support a few encodings, but we can add more if you need something special.
Examples
Write UTF-8 file with some text:
MBS("String.WriteTextFile"; $Text; $Path; "utf8" )
Write a test text file:
MBS("String.WriteTextFile"; "Hello World. Some umlauts: äöü"; "/Users/cs/Desktop/testfile.txt"; "native")
Feedback: Report problem or ask question.
Links
MBS REAL studio Plugins - Pfarrgemeinde St. Arnulf Nickenich