toHTML - convert Unicode string(s) to HTML

版本 1.3 (2.8 KB) 作者: Rody Oldenhuis
Convert a (cell) string to its Unicode representation in HTML.
318.0 次下载
更新时间 2020/5/2

TOHTML Converts strings to their UTF-8 HTML representation
str = TOHTML(str) converts the input string or cell array of strings to its Unicode representation in HTML. All characters but one: any occurrence of the newline character (char(10)) will be converted to the string '<br>'.
This function is most useful when creating buttons in a GUI, that need to contain a multi-line string with Unicode characters. For example:

EXAMPLE:

uicontrol(...
'style' , 'pushbutton',...
'units' , 'normalized',...
'string' , toHTML(['θ·Ω' char(10) 'A×B']),...
'position', [0.05 0.05 0.1 0.1]...
);

引用格式

Rody Oldenhuis (2024). toHTML - convert Unicode string(s) to HTML (https://github.com/rodyo/FEX-toHTML/releases/tag/v1.3), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.3

See release notes for this release on GitHub: https://github.com/rodyo/FEX-toHTML/releases/tag/v1.3

1.2.0.0

[linked to Github]

1.1.0.0

Updated contact info

1.0.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库