summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/strconv.xhp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /helpcontent2/source/text/sbasic/shared/strconv.xhp
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'helpcontent2/source/text/sbasic/shared/strconv.xhp')
-rw-r--r--helpcontent2/source/text/sbasic/shared/strconv.xhp181
1 files changed, 181 insertions, 0 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/strconv.xhp b/helpcontent2/source/text/sbasic/shared/strconv.xhp
new file mode 100644
index 000000000..e00a005e0
--- /dev/null
+++ b/helpcontent2/source/text/sbasic/shared/strconv.xhp
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<meta>
+ <topic id="strconvvbafunc" indexer="include" status="PUBLISH">
+ <title id="tit" xml-lang="en-US">StrConv Function [VBA]</title>
+ <filename>/text/sbasic/shared/strconv.xhp</filename>
+ </topic>
+</meta>
+<body>
+<bookmark xml-lang="en-US" branch="index" id="bm_id941622761814292">
+<bookmark_value>StrConv function</bookmark_value>
+</bookmark>
+<section id="vbastrconv">
+ <h1 id="hd_id791622761498015"><link href="text/sbasic/shared/strconv.xhp" name="StrConv Function">StrConv Function</link></h1>
+ <paragraph id="par_id621622761498018" role="paragraph" xml-lang="en-US"><variable id="variable name">Convert a string as specified by a conversion type.</variable></paragraph>
+</section>
+<embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="code" id="par_id771622762489917">StrConv(Text, Conversion, [ LCID ])</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
+<paragraph role="paragraph" id="par_id971548420129767" localize="false">String</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph role="paragraph" id="par_id421622762822934"><emph>Text</emph>: Any valid string expression.</paragraph>
+<paragraph role="paragraph" id="par_id671622762931475"><emph>Conversion</emph>: The type of conversion to perform, as defined in the table below.</paragraph>
+<section id="StrConv_constants">
+<table id="tab_id91622763145456">
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id531622763145456" role="tablehead">Conversion</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id131622763145457" role="tablehead">Value</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id411622763145457" role="tablehead">Description</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id721622763145457" role="tablecontent" localize="false">vbUpperCase</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id11622763145458" role="tablecontent" localize="false">1</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id421622763145458" role="tablecontent">Converts <emph>Text</emph> characters to uppercase.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id91622763415122" role="tablecontent" localize="false">vbLowerCase</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id911622763415123" role="tablecontent" localize="false">2</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id251622763427976" role="tablecontent" xml-lang="en-US">Converts <emph>Text</emph> characters lowercase.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id1001622764064614" role="tablecontent" localize="false">vbProperCase</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id21622764064614" role="tablecontent" localize="false">3</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id531622764070154" role="tablecontent" xml-lang="en-US">Converts the first letter of every word in <emph>Text</emph> to uppercase.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id891622764187452" role="tablecontent" localize="false">vbWide</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id471622764187452" role="tablecontent" localize="false">4</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id881622764192628" role="tablecontent" xml-lang="en-US" >Converts narrow (<link href="text/shared/00/00000005.xhp#halfwidth" name="halfwidth">half-width</link>) characters in <emph>Text</emph> to wide (<link href="text/shared/00/00000005.xhp#halfwidth" name="halfwidth">full-width</link>) characters.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121622764454098" role="tablecontent" localize="false">vbNarrow</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id31622764454099" role="tablecontent" localize="false">8</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id71622764459352" role="paragraph" xml-lang="en-US">Converts wide (<link href="text/shared/00/00000005.xhp#halfwidth" name="halfwidth">full-width</link>) characters in <emph>Text</emph> to narrow (<link href="text/shared/00/00000005.xhp#halfwidth" name="halfwidth">half-width</link>) characters.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id801622764558261" role="tablecontent" localize="false">vbKatakana</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id531622764558262" role="tablecontent" localize="false">16</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id371622764565366" role="tablecontent" xml-lang="en-US" >Converts Hiragana characters in <emph>Text</emph> to Katakana characters.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id771622764721149" role="tablecontent" localize="false">vbHiragana</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id901622764721150" role="tablecontent" localize="false">32</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id911622764728794" role="tablecontent" xml-lang="en-US">Converts Katakana characters in <emph>Text</emph> to Hiragana characters.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id211622764833771" role="tablecontent" localize="false">vbUnicode</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id321622764833772" role="tablecontent" localize="false">64</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id21622764841321" role="tablecontent" xml-lang="en-US">Converts <emph>Text</emph> characters to Unicode characters using the default code page of the system.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id901622764984846" role="tablecontent" localize="false">vbFromUnicode</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id281622764984846" role="tablecontent" localize="false">128</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id221622764991492" role="tablecontent" xml-lang="en-US" >Converts <emph>Text</emph> characters from Unicode to the default code page of the system.</paragraph>
+ </tablecell>
+ </tablerow>
+</table>
+</section>
+<paragraph role="paragraph" id="par_id761622765118156"><emph>LCID</emph> Optional. The Locale ID in decimal number. If this parameter is omitted, it assumes the system Locale ID. Refer to the file <link href="https://opengrok.libreoffice.org/xref/core/l10ntools/source/ulfconv/msi-encodinglist.txt" name="LCID">msi-encodinglist.txt</link> for the available LCID values.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+<bascode>
+<paragraph role="bascode" id="par_id321548420503855" xml-lang="en-US" localize="false">Option VBASupport 1</paragraph>
+<paragraph role="bascode" id="par_id431548420514604" xml-lang="en-US" localize="false">Option Explicit</paragraph>
+<paragraph role="bascode" id="par_id181548420522842" xml-lang="en-US" localize="false">Sub Test_StrConv</paragraph>
+ <paragraph role="bascode" id="par_id251622770431375" xml-lang="en-US" localize="false">Print StrConv("abc EFG hij", vbUpperCase) '= "ABC EFG HIJ"</paragraph>
+ <paragraph role="bascode" id="par_id321622770438020" xml-lang="en-US" localize="false">Print StrConv("abc EFG hij", vbLowerCase) ' = "abc efg hij"</paragraph>
+ <paragraph role="bascode" id="par_id271622770442247" xml-lang="en-US" localize="false">Print StrConv("abc EFG hij", vbProperCase) ' = "Abc Efg Hij"</paragraph>
+
+ <paragraph role="bascode" id="par_id311622770486052" xml-lang="en-US">REM Converts narrow (single-byte) characters in string to wide</paragraph>
+ <paragraph role="bascode" id="par_id31622770457020" xml-lang="en-US" localize="false">Print StrConv("ABCDEVB¥ì¥¹¥­¥å©", vbWide) ' = "ABCDEVB¥ì¥¹¥­¥å©"</paragraph>
+
+ <paragraph role="bascode" id="par_id231622770493491" xml-lang="en-US">REM Converts wide (double-byte) characters in string to narrow (single-byte) characters</paragraph>
+ <paragraph role="bascode" id="par_id371622770464200" xml-lang="en-US" localize="false">Print StrConv("ABCD@$%23'?EG", vbNarrow) ' = "ABCD@$%23'?EG"</paragraph>
+
+ <paragraph role="bascode" id="par_id871622770498992" xml-lang="en-US">REM Converts Hiragana characters in string to Katakana characters</paragraph>
+ <paragraph role="bascode" id="par_id291622770470204" xml-lang="en-US" localize="false">Print StrConv("かたかな", vbKatakana) ' = "カタカナ"</paragraph>
+
+ <paragraph role="bascode" id="par_id351622770504087" xml-lang="en-US">REM Converts Katakana characters in string to Hiragana characters</paragraph>
+ <paragraph role="bascode" id="par_id601622770474346" xml-lang="en-US" localize="false">Print StrConv("カタカナ", vbHiragana) '= "かたかな"</paragraph>
+
+ <paragraph role="bascode" id="par_id861622770508875" xml-lang="en-US">REM Assumes CP-1252 encoding associated with en-US locale used in unit tests.</paragraph>
+ <paragraph role="bascode" id="par_id481622770521394" xml-lang="en-US" localize="false">Dim x() As Byte</paragraph>
+ <paragraph role="bascode" id="par_id691622770750591" xml-lang="en-US" localize="false">x = StrConv("ÉϺ£ÊÐABC", vbFromUnicode)</paragraph>
+ <paragraph role="bascode" id="par_id841622770962002" xml-lang="en-US">Print UBound(x) ' 8 characters</paragraph>
+ <paragraph role="bascode" id="par_id931622770966903" xml-lang="en-US" localize="false">Print x(2) ' = 186</paragraph>
+ <paragraph role="bascode" id="par_id91622770974484" xml-lang="en-US" localize="false">Print StrConv(x, vbUnicode)' = "ÉϺ£ÊÐABC"</paragraph>
+<paragraph role="bascode" id="par_id121622772546703" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/special_vba_func.xhp#exclusivevba"/>
+</section>
+</body>
+</helpdocument>