1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507
|
<?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="SF_String" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">ScriptForge.String service (SF_String)</title>
<filename>/text/sbasic/shared/03/sf_string.xhp</filename>
</topic>
</meta>
<body>
<section id="ScriptForge-sf_string">
<bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id151579602147056">
<bookmark_value>String service</bookmark_value>
</bookmark>
</section>
<section id="abstract">
<h1 id="hd_id521580038927003"><variable id="StringService"><link href="text/sbasic/shared/03/sf_string.xhp"><literal>ScriptForge</literal>.<literal>String</literal> service</link></variable></h1>
<paragraph role="paragraph" id="par_id351579602570526">The <literal>String</literal> service provides a collection of methods for string processing. These methods can be used to:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id611611952070366" role="listitem">Validate the contents of strings</paragraph>
</listitem>
<listitem>
<paragraph id="par_id611611952070376" role="listitem">Format strings by trimming, justifying or wrapping their contents</paragraph>
</listitem>
<listitem>
<paragraph id="par_id611611952070367" role="listitem">Use regular expressions to search and replace substrings</paragraph>
</listitem>
<listitem>
<paragraph id="par_id611611952070368" role="listitem">Apply hash algorithms on strings, etc.</paragraph>
</listitem>
</list>
</section>
<h2 id="hd_id961579603699855">Definitions</h2>
<h3 id="hd_id441579603838777">Line breaks</h3>
<paragraph role="paragraph" id="par_id791611946942340">The <literal>String</literal> service recognizes the following line breaks:</paragraph>
<table id="tab_id411611947117831">
<tablerow>
<tablecell>
<paragraph id="par_id151611947117831" role="tablehead">Symbolic name</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id721611947117831" role="tablehead">ASCII number</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id761611947117831" role="tablecontent">
Line feed<br/>
Vertical tab<br/>
Carriage return<br/>
Carriage return + Line feed<br/>
File separator<br/>
Group separator<br/>
Record separator<br/>
Next line<br/>
Line separator<br/>
Paragraph separator
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id211611947117831" role="tablecontent" localize="false">
10 <br/> 12 <br/> 13 <br/> 13 + 10 <br/> 28 <br/> 29 <br/> 30 <br/> 133 <br/> 8232 <br/> 8233
</paragraph>
</tablecell>
</tablerow>
</table>
<h3 id="hd_id161579604225813">Whitespaces</h3>
<paragraph role="paragraph" id="par_id401611948279056">The <literal>String</literal> service recognizes the following whitespaces:</paragraph>
<table id="tab_id411611947117831">
<tablerow>
<tablecell>
<paragraph id="par_id151611947117893" role="tablehead">Symbolic name</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id721611947117855" role="tablehead">ASCII number</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id761611947117835" role="tablecontent">
Space<br/>
Horizontal tab<br/>
Line feed<br/>
Vertical tab<br/>
Form feed<br/>
Carriage return<br/>
Next line<br/>
No-break space<br/>
Line separator<br/>
Paragraph separator
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id211611947117832" role="tablecontent" localize="false">
32 <br/> 9 <br/> 10 <br/> 11 <br/> 12 <br/> 13 <br/> 133 <br/> 160 <br/> 8232 <br/> 8233
</paragraph>
</tablecell>
</tablerow>
</table>
<h3 id="hd_id191580480825160">Escape sequences</h3>
<paragraph role="paragraph" id="par_id971611949145057">Below is a list of escape sequences that can be used in strings.</paragraph>
<table id="tab_id411611947117834">
<tablerow>
<tablecell>
<paragraph id="par_id151611947117287" role="tablehead">Escape Sequence</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id721611947117732" role="tablehead">Symbolic name</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id721611947117144" role="tablehead">ASCII number</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id771611948706049" role="tablecontent" localize="false">
\n <br/> \r <br/> \t
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id761611947119834" role="tablecontent">
Line feed<br/>
Carriage return<br/>
Horizontal tab
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id211611947117163" role="tablecontent" localize="false">
10 <br/> 13 <br/> 9
</paragraph>
</tablecell>
</tablerow>
</table>
<tip id="par_id251611949474763">To have the escape sequence "\n" interpreted as an actual string, simply use "\\n" instead of <literal>"\" & Chr(10).</literal></tip>
<h3 id="hd_id771579606799550">Non-printable characters:</h3>
<paragraph role="paragraph" id="par_id531579606877342">Characters defined in the Unicode Character Database as “Other” or “Separator” are considered as non-printable characters.</paragraph>
<paragraph role="paragraph" id="par_id221611949584320">Control characters (ASCII code <= 0x1F) are also considered as non-printable.</paragraph>
<h3 id="hd_id661579604944268">Quotes inside strings:</h3>
<paragraph role="paragraph" id="par_id551579605035332">To add quotes in strings use \' (single quote) or \" (double quote). For example:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id201611949691285" role="listitem">The string <literal>[str\'i\'ng]</literal> is interpreted as <literal>[str'i'ng]</literal></paragraph>
</listitem>
<listitem>
<paragraph id="par_id201611949691323" role="listitem">The string <literal>[str\"i\"ng]</literal> is interpreted as <literal>[str"i"ng]</literal></paragraph>
</listitem>
</list>
<h2 id="hd_id201586594659135">Service invocation</h2>
<paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>ScriptForge.String</literal> service the <literal>ScriptForge</literal> library needs to be loaded using:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id871608192694632">GlobalScope.BasicLibraries.loadLibrary("ScriptForge")</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id271627158844922">Loading the library will create the <literal>SF_String</literal> object that can be used to call the methods in the <literal>String</literal> service.</paragraph>
<paragraph role="paragraph" id="par_id63158659509728">The following code snippets show the three ways to call methods from the <literal>String</literal> service (the <literal>Capitalize</literal> method is used as an example):</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id641627157912899">Dim s as String : s = "abc def"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id181586594723543">s = SF_String.Capitalize(s) ' Abc Def</paragraph>
</bascode>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id641627157912017">Dim s as String : s = "abc def"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id441586594733346">Dim svc : svc = SF_String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id481586594739978">s = svc.Capitalize(s) ' Abc Def</paragraph>
</bascode>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id641627157912647">Dim s as String : s = "abc def"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id431586594750461">Dim svc : svc = CreateScriptService("String")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id471586594758689">s = svc.Capitalize(s) ' Abc Def</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<paragraph role="paragraph" id="par_id761627158463235">The code snippet below illustrates how to invoke methods from the <literal>String</literal> service in Python scripts. The <literal>IsIPv4</literal> method is used as an example.</paragraph>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id171627158604379">from scriptforge import CreateScriptService</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id101627158604648">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id171627158604858">ip_address = '192.168.0.14'</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id551627158605138">svc.IsIPv4(ip_address) # True</paragraph>
</pycode>
<h2 id="hd_id651584978211886">Properties</h2>
<paragraph role="paragraph" id="par_id241611950267068">The <literal>SF_String</literal> object provides the following properties for Basic scripts:</paragraph>
<section id="properties_toc">
<table id="tab_id761584978211275">
<tablerow>
<tablecell>
<paragraph id="par_id271584978211792" role="tablehead">Name</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id241584978211550" role="tablehead">ReadOnly</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id621584978211403" role="tablehead">Description</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id581584978715552" role="tablecontent" localize="false">sfCR</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id71584978715562" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id581584978715701" role="tablecontent">Carriage return: Chr(13)</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id91584978211231" role="tablecontent" localize="false">sfCRLF</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id211584978211383" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id691584978211774" role="tablecontent">Carriage return + Linefeed: Chr(13) & Chr(10)</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id1001584978666440" role="tablecontent" localize="false">sfLF</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id671584978666689" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id951584978666296" role="tablecontent">Linefeed: Chr(10)</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id311584978666162" role="tablecontent" localize="false">sfNEWLINE</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id421584978666327" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id901584978666158" role="tablecontent">Carriage return + Linefeed, which can be<br/>1) Chr(13) & Chr(10) or
<br/>2) Linefeed: Chr(10)
<br/>depending on the operating system.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id371584978666469" role="tablecontent" localize="false">sfTAB</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id541584978666991" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id741584978666508" role="tablecontent">Horizontal tabulation: Chr(9)</paragraph>
</tablecell>
</tablerow>
</table>
</section>
<tip id="par_id461584978880380">You can use the properties above to identify or insert the corresponding characters inside strings. For example, the Linefeed can be replaced by <literal>SF_String.sfLF</literal>.</tip>
<section id="methods_toc">
<table id="tab_id501611613601554">
<tablerow>
<tablecell colspan="3">
<paragraph id="par_id891611613601554" role="tablehead" xml-lang="en-US">List of Methods in the String Service</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph id="par_id891611613601556" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_string.xhp#Capitalize">Capitalize</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Count">Count</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#EndsWith">EndsWith</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Escape">Escape</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#ExpandTabs">ExpandTabs</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#FilterNotPrintable">FilterNotPrintable</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#FindRegex">FindRegex</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#HashStr">HashStr</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#HtmlEncode">HtmlEncode</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsADate">IsADate</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsAlpha">IsAlpha</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsAlphaNum">IsAlphaNum</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsAscii">IsAscii</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsDigit">IsDigit</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsEmail">IsEmail</link><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id541611613601554" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_string.xhp#IsFileName">IsFileName</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsHexDigit">IsHexDigit</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsIBAN">IsIBAN</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsIPv4">IsIPv4</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsLike">IsLike</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsLower">IsLower</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsPrintable">IsPrintable</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsRegex">IsRegex</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsSheetName">IsSheetName</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsTitle">IsTitle</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsUpper">IsUpper</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsUrl">IsUrl</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsWhitespace">IsWhitespace</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#JustifyCenter">JustifyCenter</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#JustifyLeft">JustifyLeft</link><br/>
</paragraph>
</tablecell>
<tablecell>
<paragraph id="par_id701611613601554" role="tablecontent" localize="false">
<link href="text/sbasic/shared/03/sf_string.xhp#JustifyRight">JustifyRight</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Quote">Quote</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#ReplaceChar">ReplaceChar</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#ReplaceRegex">ReplaceRegex</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#ReplaceStr">ReplaceStr</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Represent">Represent</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Reverse">Reverse</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#SplitLines">SplitLines</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#SplitNotQuoted">SplitNotQuoted</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#StartsWith">StartsWith</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#TrimExt">TrimExt</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Unescape">Unescape</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Unquote">Unquote</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#Wrap">Wrap</link><br/><br/>
</paragraph>
</tablecell>
</tablerow>
</table>
</section>
<note id="par_id151611951803163">The first argument of most methods is the string to be considered. It is always passed by reference and left unchanged. Methods such as <literal>Capitalize</literal>, <literal>Escape</literal>, etc return a new string after their execution.</note>
<warning id="par_id371627158142730">Because Python has comprehensive built-in string support, most of the methods in the <literal>String</literal> service are available for Basic scripts only. The methods available for Basic and Python are: <literal>HashStr</literal>, <literal>IsADate</literal>, <literal>IsEmail</literal>, <literal>IsFileName</literal>, <literal>IsIBAN</literal>, <literal>IsIPv4</literal>, <literal>IsLike</literal>, <literal>IsSheetName</literal>, <literal>IsUrl</literal>, <literal>SplitNotQuoted</literal> and <literal>Wrap</literal>.</warning>
<section id="Capitalize">
<comment> Capitalize -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id121582203710297">
<bookmark_value>String service;Capitalize</bookmark_value>
</bookmark>
<h2 id="hd_id791579683635979" localize="false">Capitalize</h2>
<paragraph role="paragraph" id="par_id271579683706571">Capitalizes the first character from each word in the input string.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id121627158901416">
<input>svc.Capitalize(inputstr: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id941582304592013"><emph>inputstr</emph>: The string to be capitalized.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id631579688532444">Dim sName as String : sName = "john smith"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id451579686015963">Dim sCapitalizedName as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id41579785318230">sCapitalizedName = SF_String.Capitalize(sName)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id801579688542131">MsgBox sCapitalizedName 'John Smith</paragraph>
</bascode>
</section>
<section id="Count">
<comment> Count ------------------------------------------------------------------------------------------------- </comment>
<bookmark branch="index" id="bm_id421582384432626" localize="false">
<bookmark_value>String service;Count</bookmark_value>
</bookmark>
<h2 id="hd_id1001582384527265" localize="false">Count</h2>
<paragraph role="paragraph" id="par_id891582384556756">Counts the number of occurrences of a substring or a regular expression within a string.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id421627159083108">
<input>svc.Count(inputstr: str, substring: str, [isregex: bool], [casesensitive: bool]): int</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id571582384689863"><emph>inputstr</emph>: The input string to be examined</paragraph>
<paragraph role="paragraph" id="par_id601582384696486"><emph>substring</emph>: The substring or the regular expression to be used during search</paragraph>
<paragraph role="paragraph" id="par_id451582384703719"><emph>isregex</emph>: Use <literal>True</literal> if the substring is a regular expression (Default = <literal>False</literal>)</paragraph>
<paragraph role="paragraph" id="par_id141582384726168"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" id="bas_id371582384749769">'Counts the occurrences of the substring "or" inside the input string (returns 2)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id281582384809689">MsgBox SF_String.Count("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "or", CaseSensitive := False)</paragraph>
<paragraph role="bascode" id="bas_id561582384801586">'Counts the number of words with only lowercase letters (returns 7)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id631582384780777">MsgBox SF_String.Count("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "\b[a-z]+\b", IsRegex := True, CaseSensitive := True)</paragraph>
</bascode>
<tip id="par_id131612223767126">To learn more about regular expressions, refer to the Python's documentation on <link href="https://docs.python.org/3/library/re.html">Regular Expression Operations</link>.</tip>
</section>
<section id="EndsWith">
<comment> EndsWith ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id771582203795803">
<bookmark_value>String service;EndsWith</bookmark_value>
</bookmark>
<h2 id="hd_id801579687630238" localize="false">EndsWith</h2>
<paragraph role="paragraph" id="par_id581579687739629">Returns <literal>True</literal> if a string ends with a specified substring.</paragraph>
<paragraph role="paragraph" id="par_id21612306392239">The function returns <literal>False</literal> when either the string or the substring have a length = 0 or when the substring is longer than the string.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id551627159333520">
<input>svc.EndsWith(inputstr: str, substring: str, [casesensitive: bool]): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id191579861552201"><emph>inputstr</emph>: The string to be tested.</paragraph>
<paragraph role="paragraph" id="par_id211579861561473"><emph>substring</emph>: The substring to be searched at the end of <literal>inputstr</literal>.</paragraph>
<paragraph role="paragraph" id="par_id801579861574009"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" id="bas_id811579862998452">'Returns True because the method was called with the default CaseSensitive = False</paragraph>
<paragraph role="bascode" localize="false" id="bas_id581579863063364">MsgBox SF_String.EndsWith("abcdefg", "EFG")</paragraph>
<paragraph role="bascode" id="bas_id231579863168747">'Returns False due to the CaseSensitive parameter</paragraph>
<paragraph role="bascode" localize="false" id="bas_id221579863071644">MsgBox SF_String.EndsWith("abcdefg", "EFG", CaseSensitive := True)</paragraph>
</bascode>
</section>
<section id="Escape">
<comment> Escape ------------------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id731585921441446">
<bookmark_value>String service;Escape</bookmark_value>
</bookmark>
<h2 id="hd_id821585921441213" localize="false">Escape</h2>
<paragraph role="paragraph" id="par_id921585921441429">Converts linebreaks and tabs contained in the input string to their equivalent escaped sequence (\\, \n, \r, \t).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id151627159520587">
<input>svc.Escape(inputstr: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id9158592144110"><emph>inputstr</emph>: The string to be converted.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" id="bas_id901585921441483">'Returns the string "abc\n\tdef\\n"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id741585921441977">MsgBox SF_String.Escape("abc" & Chr(10) & Chr(9) & "def\n")</paragraph>
</bascode>
</section>
<section id="ExpandTabs">
<comment> ExpandTabs -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id161582203880251">
<bookmark_value>String service;ExpandTabs</bookmark_value>
</bookmark>
<h2 id="hd_id761579868039113" localize="false">ExpandTabs</h2>
<paragraph role="paragraph" id="par_id271579868053137">Replaces Tab characters <literal>Chr(9)</literal> by space characters to replicate the behavior of tab stops.</paragraph>
<paragraph role="paragraph" id="par_id951579868064344">If a line break is found, a new line is started and the character counter is reset.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id821627159598950">
<input>svc.ExpandTabs(inputstr: str, [tabsize: int]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id231579868290408"><emph>inputstr</emph>: The string to be expanded</paragraph>
<paragraph role="paragraph" id="par_id281579868299807"><emph>tabsize</emph>: This parameter is used to determine the Tab stops using the formula: TabSize + 1, 2 * TabSize + 1 , ... N * TabSize + 1 (Default = 8)</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id611579868690878">Dim myText as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id931585922081615">myText = "100" & SF_String.sfTAB & "200" & SF_String.sfTAB & "300" & SF_String.sfNEWLINE & _</paragraph>
<paragraph role="bascode" localize="false" id="bas_id311579868703742"> "X" & SF_String.sfTAB & "Y" & SF_String.sfTAB & "Z"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id841585921966229">MsgBox SF_String.ExpandTabs(myText)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id461579868714135">'100 200 300</paragraph>
<paragraph role="bascode" localize="false" id="bas_id461579868714136">'X Y Z</paragraph>
</bascode>
</section>
<section id="FilterNotPrintable">
<comment> FilterNotPrintable ------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id231582204001536">
<bookmark_value>String service;FilterNotPrintable</bookmark_value>
</bookmark>
<h2 id="hd_id581579874537114" localize="false">FilterNotPrintable</h2>
<paragraph role="paragraph" id="par_id161579874552729">Replaces all non-printable characters in the input string by a given character.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id271627159754299">
<input>svc.FilterNotPrintable(inputstr: str, [replacedby: str]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id431579874633865"><emph>inputstr</emph>: The string to be searched</paragraph>
<paragraph role="paragraph" id="par_id31579874656437"><emph>replacedby</emph>: Zero, one or more characters that will replace all non-printable characters in <literal>inputstr</literal> (Default = "")</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id481579874686887">Dim LF : LF = Chr(10)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id41579874696422">Dim myText as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id611579874737551">myText = "àén ΣlPµ" & LF & " Русский" & "\n"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id271579874750894">MsgBox SF_String.FilterNotPrintable(myText)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id81612308364024">' "àén ΣlPµ Русский\n"</paragraph>
</bascode>
</section>
<section id="FindRegex">
<comment> FindRegex --------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id491582204303825">
<bookmark_value>String service;FindRegex</bookmark_value>
</bookmark>
<h2 id="hd_id471579876212449" localize="false">FindRegex</h2>
<paragraph role="paragraph" id="par_id1001579876228707">Finds in a string a substring matching a given regular expression.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id591627159907982">
<input>svc.FindRegex(inputstr: str, regex: str, [start: int], [casesensitive: bool], [forward: bool]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id131579876314120"><emph>inputstr</emph>: The string to be searched</paragraph>
<paragraph role="paragraph" id="par_id751579876371545"><emph>regex</emph>: The regular expression</paragraph>
<paragraph role="paragraph" id="par_id881579876394584"><emph>start</emph>: The position in the string where the search will begin. This parameter is passed by reference, so after execution the value of <literal>start</literal> will point to the first character of the found substring. If no matching substring is found, <literal>start</literal> will be set to 0.</paragraph>
<paragraph role="paragraph" id="par_id251579876403831"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<paragraph role="paragraph" id="par_id841579876412287"><emph>forward</emph>: Determines the direction of the search. If <literal>True</literal>, search moves forward. If <literal>False</literal> search moves backwards (Default = <literal>True</literal>)</paragraph>
<paragraph role="paragraph" id="par_id451612309155653">At the first iteration, if <literal>forward = True</literal>, then <literal>start</literal> should be equal to 1, whereas if <literal>forward = False</literal> then <literal>start</literal> should be equal to <literal>Len(inputstr)</literal></paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id621579876463377">Dim lStart As Long : lStart = 1</paragraph>
<paragraph role="bascode" localize="false" id="bas_id1001579876429088">Dim result as String</paragraph>
<paragraph role="bascode" localize="false" id="bas_id571579876474344">result = SF_String.FindRegex("abCcdefghHij", "C.*H", lStart, CaseSensitive := True)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id671579876511592">MsgBox lStart & ": " & result</paragraph>
<paragraph role="bascode" localize="false" id="bas_id51579876497768">'3: CcdefghH</paragraph>
</bascode>
<tip id="par_id221612309579001">In the example above, the new value of <literal>lStart</literal> can be used to keep searching the same input string by setting the <literal>Start</literal> parameter to <literal>lStart + Len(result)</literal> at the next iteration.</tip>
</section>
<section id="HashStr">
<comment> HashStr ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id24160104898372">
<bookmark_value>String service;HashStr</bookmark_value>
</bookmark>
<h2 id="hd_id871601048983883" localize="false">HashStr</h2>
<paragraph role="paragraph" id="par_id471601048983628">Hash functions are used inside some cryptographic algorithms, in digital signatures, message authentication codes, manipulation detection, fingerprints, checksums (message integrity check), hash tables, password storage and much more.</paragraph>
<paragraph role="paragraph" id="par_id301601048983765">The <literal>HashStr</literal> method returns the result of a hash function applied on a given string and using a specified algorithm, as a string of lowercase hexadecimal digits.</paragraph>
<paragraph role="paragraph" id="par_id631601048983149">The hash algorithms supported are: <literal>MD5</literal>, <literal>SHA1</literal>, <literal>SHA224</literal>, <literal>SHA256</literal>, <literal>SHA384</literal> and <literal>SHA512</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id741627160211210">
<input>svc.HashStr(inputstr: str, algorithm: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id621601048983210"><emph>inputstr</emph>: The string to hash. It is presumed to be encoded in UTF-8. The hashing algorithm will consider the string as a stream of bytes.</paragraph>
<paragraph role="paragraph" id="par_id941601048983822"><emph>algorithm</emph>: One of the supported algorithms listed above, passed as a string.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id721601048983555">MsgBox SF_String.HashStr("œ∑¡™£¢∞§¶•ªº–≠œ∑´®†¥¨ˆøπ‘åß∂ƒ©˙∆˚¬", "MD5")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id891612351766467">' c740ccc2e201df4b2e2b4aa086f35d8a</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id201627248048720">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id101627248049176">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id401627248049343">a_string = "œ∑¡™£¢∞§¶•ªº–≠œ∑´®†¥¨ˆøπ‘åß∂ƒ©˙∆˚¬"</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id611627248049495">hash_value = svc.HashStr(a_string, "MD5")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id471627248049687">bas.MsgBox(hash_value)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121627248049991"># c740ccc2e201df4b2e2b4aa086f35d8a</paragraph>
</pycode>
</section>
<section id="HtmlEncode">
<comment> HtmlEncode -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id561582204334292">
<bookmark_value>String service;HtmlEncode</bookmark_value>
</bookmark>
<h2 id="hd_id771579879504956" localize="false">HtmlEncode</h2>
<paragraph role="paragraph" id="par_id221579879516929">Encodes the input string into the HTML character codes, replacing special characters by their <literal>&</literal> counterparts.</paragraph>
<paragraph role="paragraph" id="par_id341612351999692">For example, the character <literal>é</literal> would be replaced by <literal>&eacute;</literal> or an equivalent numerical HTML code.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id601627160353326">
<input>svc.HtmlEncode(inputstr: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="bas_id501579879570781"><emph>inputstr</emph>: The string to encode.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id671579879597547">MsgBox SF_String.HtmlEncode("<a href=""https://a.b.com"">From α to ω</a>")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id461579879607044">' "&lt;a href=&quot;https://a.b.com&quot;&gt;From &#945; to &#969;&lt;/a&gt;"</paragraph>
</bascode>
</section>
<section id="IsADate">
<comment> IsADate ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id11582204732653">
<bookmark_value>String service;IsADate</bookmark_value>
</bookmark>
<h2 id="hd_id141579880967392" localize="false">IsADate</h2>
<paragraph role="paragraph" id="par_id171579880990533">Returns <literal>True</literal> if the input string is a valid date according to a specified date format.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id191627160586821">
<input>svc.IsADate(inputstr: str, [dateformat: str]): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id151579881091821"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal></paragraph>
<paragraph role="paragraph" id="par_id991579881107670"><emph>dateformat</emph>: The date format, as a string. It can be either "YYYY-MM-DD" (default), "DD-MM-YYYY" or "MM-DD-YYYY"</paragraph>
<paragraph role="paragraph" id="par_id291579881117126">The dash (-) may be replaced by a dot (.), a slash (/) or a space.</paragraph>
<paragraph role="paragraph" id="par_id51579881125801"> If the format is invalid, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id811579881155015">MsgBox SF_String.IsADate("2020-12-31", "YYYY-MM-DD") ' True</paragraph>
</bascode>
<note id="par_id211612370427721">This method checks the format of the input string without performing any calendar-specific checks. Hence it does not test the input string for leap years or months with 30 or 31 days. For that, refer to the <link href="text/sbasic/shared/03102300.xhp"><literal>IsDate</literal> built-in function</link>.</note>
<paragraph role="paragraph" id="par_id181612371147364">The example below shows the difference between the methods <literal>IsADate</literal> (ScriptForge) and the <literal>IsDate</literal> (built-in) function.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id531612371248704">Dim myDate as String : myDate = "2020-02-30"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id731612371253577">MsgBox SF_String.IsADate(myDate, "YYYY-MM-DD") 'True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id821612371254969">MsgBox IsDate(myDate) ' False</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id831627248497889">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121627248498619">s_date = "2020-12-31"</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id621627248498786">result = svc.IsADate(s_date) # True</paragraph>
</pycode>
</section>
<section id="IsAlpha">
<comment> IsAlpha ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id491582204781995">
<bookmark_value>String service;IsAlpha</bookmark_value>
</bookmark>
<h2 id="hd_id231579881589037" localize="false">IsAlpha</h2>
<paragraph role="paragraph" id="par_id161579881600317">Returns <literal>True</literal> if all characters in the string are alphabetic.</paragraph>
<paragraph role="paragraph" id="par_id251579881615469">Alphabetic characters are those characters defined in the <link href="https://unicode.org/reports/tr44/">Unicode Character Database</link> as <literal>Letter</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id711627160772668">
<input>svc.IsAlpha(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id11579881691826"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="par_id381579881735058">MsgBox SF_String.IsAlpha("àénΣlPµ") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id331579881743363">MsgBox SF_String.IsAlpha("myVar3") ' False</paragraph>
</bascode>
</section>
<section id="IsAlphaNum">
<comment> IsAlphaNum -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id581582204814414">
<bookmark_value>String service;IsAlphanum</bookmark_value>
</bookmark>
<h2 id="hd_id711579883155335" localize="false">IsAlphaNum</h2>
<paragraph role="paragraph" id="par_id421579883181382">Returns <literal>True</literal> if all characters in the string are alphabetic, digits or "_" (underscore). The first character must not be a digit.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id981627160850954">
<input>svc.IsAlphaNum(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id31579884464101"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id611579884379482">MsgBox SF_String.IsAlphaNum("_ABC_123456_abcàénΣlPµ") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id551612445915119">MsgBox SF_String.IsAlphaNum("123ABC") ' False</paragraph>
</bascode>
</section>
<section id="IsAscii">
<comment> IsAscii ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id991582204833033">
<bookmark_value>String service;IsAscii</bookmark_value>
</bookmark>
<h2 id="hd_id891580039448798" localize="false">IsAscii</h2>
<paragraph role="paragraph" id="par_id671580039484786">Returns <literal>True</literal> if all characters in the string are ASCII characters.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id931627160994922">
<input>svc.IsAscii(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id791580039528838"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id41580039556401">MsgBox SF_String.IsAscii("a%?,25") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id841580039565265">MsgBox SF_String.IsAscii("abcàénΣlPµ") ' False</paragraph>
</bascode>
</section>
<section id="IsDigit">
<comment> IsDigit ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id741582204858557">
<bookmark_value>String service;IsDigit</bookmark_value>
</bookmark>
<h2 id="hd_id321580044756464" localize="false">IsDigit</h2>
<paragraph role="paragraph" id="par_id861580044805749">Returns <literal>True</literal> if all characters in the string are digits.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id491627161075258">
<input>svc.IsDigit(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id41580044873043"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id821580044929100">MsgBox SF_String.IsDigit("123456") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id601580044939971">MsgBox SF_String.IsDigit("_12a") ' False</paragraph>
</bascode>
</section>
<section id="IsEmail">
<comment> IsEmail ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id721582204903245">
<bookmark_value>String service;IsEmail</bookmark_value>
</bookmark>
<h2 id="hd_id601580045208963" localize="false">IsEmail</h2>
<paragraph role="paragraph" id="par_id521580045221758">Returns <literal>True</literal> if the string is a valid email address.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id561627161153727">
<input>svc.IsEmail(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id841580045280071"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id351580045300802">MsgBox SF_String.IsEmail("first.last@something.org") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id511580045308668">MsgBox SF_String.IsEmail("first.last@something.com.br") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id621580045319466">MsgBox SF_String.IsEmail("first.last@something.123") ' False</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id921627248625925">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id671627248629820">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651627248630083">bas.MsgBox(svc.IsEmail("first.last@something.org")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id451627248630275">bas.MsgBox(svc.IsEmail("first.last@something.com.br")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id491627248630514">bas.MsgBox(svc.IsEmail("first.last@something.123")) # False</paragraph>
</pycode>
</section>
<section id="IsFileName">
<comment> IsFileName -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id601582204928759">
<bookmark_value>String service;IsFileName</bookmark_value>
</bookmark>
<h2 id="hd_id941580047025136" localize="false">IsFileName</h2>
<paragraph role="paragraph" id="par_id41580047039666">Returns <literal>True</literal> if the string is a valid filename in a given operating system.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id521627161235397">
<input>svc.IsFileName(inputstr: str, [osname: str]): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id801580047079938"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<paragraph role="paragraph" id="par_id781580047088954"><emph>osname</emph>: The operating system name, as a string. It can be "WINDOWS", "LINUX", "MACOSX" or "SOLARIS".</paragraph>
<paragraph role="paragraph" id="par_id991612372824234">The default value is the current operating system on which the script is running.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id291580047101783">MsgBox SF_String.IsFileName("/home/user/Documents/a file name.odt", "LINUX") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id761580047111201">MsgBox SF_String.IsFileName("C:\home\a file name.odt", "LINUX") ' False</paragraph>
<paragraph role="bascode" localize="false" id="bas_id901580047128532">MsgBox SF_String.IsFileName("C:\home\a file name.odt", "WINDOWS") ' True</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id921627248625144">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id671627248629099">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id651627248630165">bas.MsgBox(svc.IsFileName("/home/user/Documents/a file name.odt", "LINUX")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id451627248630094">bas.MsgBox(svc.IsFileName(r"C:\home\a file name.odt", "LINUX")) # False</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id491627248630255">bas.MsgBox(svc.IsFileName(r"C:\home\a file name.odt", "WINDOWS")) # True</paragraph>
</pycode>
</section>
<section id="IsHexDigit">
<comment> IsHexDigit ------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id1001582204955266">
<bookmark_value>String service;IsHexDigit</bookmark_value>
</bookmark>
<h2 id="hd_id441580047541078" localize="false">IsHexDigit</h2>
<paragraph role="paragraph" id="par_id911580047551929">Returns <literal>True</literal> if all characters in the string are hexadecimal digits.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id141627161371952">
<input>svc.IsHexDigit(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id331580047594144"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<paragraph role="paragraph" id="par_id521612377109554">The hexadecimal digits may be prefixed with "0x" or "&H".</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id51580047615488">MsgBox SF_String.IsHexDigit("&H00FF") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id251580047624832">MsgBox SF_String.IsHexDigit("08AAFF10") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id281580047636521">MsgBox SF_String.IsHexDigit("0x18LA22") ' False</paragraph>
</bascode>
</section>
<section id="IsIBAN">
<comment> IsIBAN ------------------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id931582204907784">
<bookmark_value>String service;IsIBAN</bookmark_value>
</bookmark>
<h2 id="hd_id431580840408317" localize="false">IsIBAN</h2>
<paragraph role="paragraph" id="par_id791584008420941">Returns <literal>True</literal> if the string is a valid International Bank Account Number (IBAN). The comparison is not case-sensitive.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id291627161741207">
<input>svc.IsIBAN(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id951880048466565"> <emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph role="paragraph" id="par_id631619526542367"><literal>True</literal> if the string contains a valid IBAN number.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id71627249022958">' Basic</paragraph>
<paragraph role="bascode" localize="false" id="bas_id571500848484444">MsgBox SF_String.IsIBAN("BR15 0000 0000 0000 1093 2840 814 P2") ' True</paragraph>
</bascode>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id121627249045568"># Python</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id901627249045753">result = svc.IsIBAN("BR15 0000 0000 0000 1093 2840 814 P2") # True</paragraph>
</pycode>
</section>
<section id="IsIPv4">
<comment> IsIPv4 ------------------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id931582204977084">
<bookmark_value>String service;IsIPv4</bookmark_value>
</bookmark>
<h2 id="hd_id431580048408317" localize="false">IsIPv4</h2>
<paragraph role="paragraph" id="par_id791580048420941">Returns <literal>True</literal> if the string is a valid IP(v4) address.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id861627161817305">
<input>svc.IsIPv4(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id981580048466565"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id571580048484444">MsgBox SF_String.IsIPv4("192.168.1.50") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id871580048493061">MsgBox SF_String.IsIPv4("192.168.50") ' False</paragraph>
<paragraph role="bascode" localize="false" id="bas_id201580048501038">MsgBox SF_String.IsIPv4("255.255.255.256") ' False</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id831627249268171">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id981627249268449">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871627249268596">bas.MsgBox(svc.IsIPv4("192.168.1.50")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id211627249268763">bas.MsgBox(svc.IsIPv4("192.168.50")) # False</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id571627249268932">bas.MsgBox(svc.IsIPv4("255.255.255.256")) # False</paragraph>
</pycode>
</section>
<section id="IsLike">
<comment> IsLike ------------------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id721582205008767">
<bookmark_value>String service;IsLike</bookmark_value>
</bookmark>
<h2 id="hd_id791580049073672" localize="false">IsLike</h2>
<paragraph role="paragraph" id="par_id831580049093038">Returns <literal>True</literal> if the whole input string matches a given pattern containing wildcards.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id951627161917563">
<input>svc.IsLike(inputstr: str, pattern: str, [casesensitive: bool]): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id141580049142548"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<paragraph role="paragraph" id="par_id31580049154551"><emph>pattern</emph>: The pattern as a string. Wildcards are:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id181612441703306" role="listitem">"?" represents any single character;</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id861612377611438">"*" represents zero, one, or multiple characters.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id991580049206617"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id541580049238484">MsgBox SF_String.IsLike("aAbB", "?A*") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id821580049249434">MsgBox SF_String.IsLike("C:\a\b\c\f.odb", "?:*.*") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id981580049258743">MsgBox SF_String.IsLike("name:host", "?*@?*") ' False</paragraph>
<paragraph role="bascode" localize="false" id="bas_id821612378053774">MsgBox SF_String.IsLike("@host", "?*@?*") ' False</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id831627249268227">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id981627249268238">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871627249268903">bas.MsgBox(svc.IsLike("aAbB", "?A*")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id211627249268144">bas.MsgBox(svc.IsLike(r"C:\a\b\c\f.odb", "?:*.*")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id571627249268752">bas.MsgBox(svc.IsLike("name:host", "?*@?*")) # False</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id661627249433231">bas.MsgBox(svc.IsLike("@host", "?*@?*")) # False</paragraph>
</pycode>
</section>
<section id="IsLower">
<comment> IsLower ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id91582205043650">
<bookmark_value>String service;IsLower</bookmark_value>
</bookmark>
<h2 id="hd_id621580050021403" localize="false">IsLower</h2>
<paragraph role="paragraph" id="par_id581580050048679">Returns <literal>True</literal> if all characters in the string are in lowercase. Non-alphabetic characters are ignored.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id901627162072714">
<input>svc.IsLower(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id751580050122938"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id731580050158022">MsgBox SF_String.IsLower("abc'(-xy4z") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id881580050187982">MsgBox SF_String.IsLower("1234") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id741580050198046">MsgBox SF_String.IsLower("abcDefg") ' False</paragraph>
</bascode>
</section>
<section id="IsPrintable">
<comment> IsPrintable ------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id71582205064134">
<bookmark_value>String service;IsPrintable</bookmark_value>
</bookmark>
<h2 id="hd_id51580051636185" localize="false">IsPrintable</h2>
<paragraph role="paragraph" id="par_id231580051650488">Returns <literal>True</literal> if all characters in the string are printable.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id581627162139952">
<input>svc.IsPrintable(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id721580051706431"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id341580051737598">MsgBox SF_String.IsPrintable("àén ΣlPµ Русский") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id791580051747813">MsgBox SF_String.IsPrintable("First line." & Chr(10) & "Second Line.") ' False</paragraph>
</bascode>
</section>
<section id="IsRegex">
<comment> IsRegex ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id561582205088656">
<bookmark_value>String service;IsRegex</bookmark_value>
</bookmark>
<h2 id="hd_id11580052383614" localize="false">IsRegex</h2>
<paragraph role="paragraph" id="par_id281580052400960">Returns <literal>True</literal> if the whole input string matches a given regular expression.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id581627162222687">
<input>svc.IsRegex(inputstr: str, regex: str, [casesensitive: bool]): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id161580052454770"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<paragraph role="paragraph" id="par_id581580052467973"><emph>regex</emph>: The regular expression. If empty, the method returns <literal>False</literal>.</paragraph>
<paragraph role="paragraph" id="par_id621580052654341"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id711580052523722">MsgBox SF_String.IsRegex("aAbB", "[A-Za-z]+") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id431580052508625">MsgBox SF_String.IsRegex("John;100", "[A-Za-z]+;[0-9]+") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id71580052534405">MsgBox SF_String.IsRegex("John;100;150", "[A-Za-z]+;[0-9]+") ' False</paragraph>
</bascode>
</section>
<section id="IsSheetName">
<comment> IsSheetName ------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id901589460240654">
<bookmark_value>String service;IsSheetName</bookmark_value>
</bookmark>
<h2 id="hd_id791589460240472" localize="false">IsSheetName</h2>
<paragraph role="paragraph" id="par_id1001589460240467">Returns <literal>True</literal> if the input string is a valid Calc sheet name.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id171627162339798">
<input>svc.IsSheetName(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id671589460240552"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id391589460240928">MsgBox SF_String.IsSheetName("1àbc + ""déf""") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id681589460240214">MsgBox SF_String.IsSheetName("[MySheet]") ' False</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id831627249268323">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id981627249268455">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871627249268018">bas.MsgBox(svc.IsSheetName("1àbc + ""déf""")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id211627249268278">bas.MsgBox(svc.IsSheetName("[MySheet]")) # False</paragraph>
</pycode>
<note id="par_id551612442002823">A sheet name must not contain the characters [ ] * ? : / \ or the character ' (apostrophe) as first or last character.</note>
</section>
<section id="IsTitle">
<comment> IsTitle ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id461582205108468">
<bookmark_value>String service;IsTitle</bookmark_value>
</bookmark>
<h2 id="hd_id571580293080317" localize="false">IsTitle</h2>
<paragraph role="paragraph" id="par_id371580293093655">Returns <literal>True</literal> if the first character of every word is in uppercase and the other characters are in lowercase.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id741627162408971">
<input>svc.IsTitle(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id471580293142283"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id701580293163557">MsgBox SF_String.IsTitle("This Is The Title Of My Book") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id371580293175037">MsgBox SF_String.IsTitle("This is the Title of my Book") ' False</paragraph>
<paragraph role="bascode" localize="false" id="bas_id1001580293184622">MsgBox SF_String.IsTitle("Result Number 100") ' True</paragraph>
</bascode>
</section>
<section id="IsUpper">
<comment> IsUpper ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id31582205124227">
<bookmark_value>String service;IsUpper</bookmark_value>
</bookmark>
<h2 id="hd_id341580128661190" localize="false">IsUpper</h2>
<paragraph role="paragraph" id="par_id801580128672004">Returns <literal>True</literal> if all characters in the string are in uppercase. Non alphabetic characters are ignored.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id271627162484974">
<input>svc.IsUpper(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id391580128736809"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id81580128769670">MsgBox SF_String.IsUpper("ABC'(-XYZ") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id951580128785698">MsgBox SF_String.IsUpper("A Title") ' False</paragraph>
</bascode>
</section>
<section id="IsUrl">
<comment> IsUrl ------------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id431582205169135">
<bookmark_value>String service;IsUrl</bookmark_value>
</bookmark>
<h2 id="hd_id211580132006615" localize="false">IsUrl</h2>
<paragraph role="paragraph" id="par_id531580132067813">Returns <literal>True</literal> if the string is a valid absolute URL (Uniform Resource Locator) address. Only the http, https and ftp protocols are supported.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id301627162561225">
<input>svc.IsUrl(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id321580132113593"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id41580132143630">MsgBox SF_String.IsUrl("http://foo.bar/?q=Test%20URL-encoded%20stuff") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id811580132160302">MsgBox SF_String.IsUrl("www.somesite.org") ' False</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id831627249268852">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id981627249268254">bas = CreateScriptService("Basic")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871627249268007">bas.MsgBox(svc.IsUrl("http://foo.bar/?q=Test%20URL-encoded%20stuff")) # True</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id211627249268997">bas.MsgBox(svc.IsUrl("www.somesite.org")) # False</paragraph>
</pycode>
</section>
<section id="IsWhitespace">
<comment> IsWhitespace ----------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id551582205196046">
<bookmark_value>String service;IsWhitespace</bookmark_value>
</bookmark>
<h2 id="hd_id401580132462319" localize="false">IsWhitespace</h2>
<paragraph role="paragraph" id="par_id41580132491698">Returns <literal>True</literal> if all characters in the string are whitespaces</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id981627162624424">
<input>svc.IsWhitespace(inputstr: str): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id801580132535511"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id71580132555742">MsgBox SF_String.IsWhitespace(" ") ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id191580132564154">MsgBox SF_String.IsWhitespace(" " & Chr(9) & Chr(10)) ' True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id531580132571745">MsgBox SF_String.IsWhitespace("") ' False</paragraph>
</bascode>
</section>
<section id="JustifyCenter">
<comment> JustifyCenter ----------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id421582205214600">
<bookmark_value>String service;JustifyCenter</bookmark_value>
</bookmark>
<h2 id="hd_id291580133287288" localize="false">JustifyCenter</h2>
<paragraph role="paragraph" id="par_id891580133307100">Returns the input string center-justified.</paragraph>
<paragraph role="paragraph" id="par_id571612380829021">The leading and trailing white spaces are stripped and the remaining characters are completed left and right up to a specified total <literal>length</literal> with the character <literal>padding</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id911627162696565">
<input>svc.JustifyCenter(inputstr: str, [length: int], [padding: str]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id911580133391827"><emph>inputstr</emph>: The string to be center-justified. If empty, the method returns an empty string.</paragraph>
<paragraph role="paragraph" id="par_id671580133694946"><emph>length</emph>: The length of the resulting string (default = the length of the input string).</paragraph>
<paragraph role="paragraph" id="par_id511612381090109">If the specified length is shorter than the center-justified input string, then the returned string is truncated.</paragraph>
<paragraph role="paragraph" id="par_id101580133705268"><emph>padding</emph>: The single character to be used as padding (default = the ASCII space " ").</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id121580133437963">MsgBox SF_String.JustifyCenter("Title", Length := 11) ' " Title "</paragraph>
<paragraph role="bascode" localize="false" id="bas_id701580133452083">MsgBox SF_String.JustifyCenter(" ABCDEF", Padding := "_") ' "__ABCDEF__"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id841580133480737">MsgBox SF_String.JustifyCenter("A Long Title", Length := 5) ' "ong T"</paragraph>
</bascode>
</section>
<section id="JustifyLeft">
<comment> JustifyLeft ------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id351582205243403">
<bookmark_value>String service;JustifyLeft</bookmark_value>
</bookmark>
<h2 id="hd_id51580135447561" localize="false">JustifyLeft</h2>
<paragraph role="paragraph" id="par_id911580135466348">Returns the input string left-justified.</paragraph>
<paragraph role="paragraph" id="par_id431612381917641">The leading white spaces are stripped and the remaining characters are completed to the right up to a specified total <literal>length</literal> with the character <literal>padding</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id551627162821330">
<input>svc.JustifyLeft(inputstr: str, [length: int], [padding: str]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id281580135523448"><emph>inputstr</emph>: The string to be left-justified. If empty, the method returns an empty string.</paragraph>
<paragraph role="paragraph" id="par_id431580135534910"><emph>length</emph>: The length of the resulting string (default = the length of the input string).</paragraph>
<paragraph role="paragraph" id="par_id161612381664182">If the specified length is shorter than the left-justified input string, then the returned string is truncated.</paragraph>
<paragraph role="paragraph" id="par_id221580135568475"><emph>padding</emph>: The single character to be used as padding (default = the ASCII space " ").</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id611580135592267">MsgBox SF_String.JustifyLeft("Title", Length := 10) ' "Title "</paragraph>
<paragraph role="bascode" localize="false" id="bas_id131580135610150">MsgBox SF_String.JustifyLeft(" ABCDEF", Padding := "_") ' "ABCDEF____"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id441580135619176">MsgBox SF_String.JustifyLeft("A Long Title", Length := 5) ' "A Lon"</paragraph>
</bascode>
</section>
<section id="JustifyRight">
<comment> JustifyRight ------------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id401582205265380">
<bookmark_value>String service;JustifyRight</bookmark_value>
</bookmark>
<h2 id="hd_id651580136079149" localize="false">JustifyRight</h2>
<paragraph role="paragraph" id="par_id821580136091225">Returns the input string right-justified.</paragraph>
<paragraph role="paragraph" id="par_id771612382000293">The leading white spaces are stripped and the remaining characters are completed to the left up to a specified total <literal>length</literal> with the character <literal>padding</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id161627162950390">
<input>svc.JustifyRight(inputstr: str, [length: int], [padding: str]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id201580136154170"><emph>inputstr</emph>: The string to be right-justified. If empty, the method returns an empty string.</paragraph>
<paragraph role="paragraph" id="par_id71580136164632"><emph>length</emph>: The length of the resulting string (default = the length of the input string).</paragraph>
<paragraph role="paragraph" id="par_id191612381732163">If the specified length is shorter than the right-justified input string, then the returned string is truncated.</paragraph>
<paragraph role="paragraph" id="par_id751580136200680"><emph>padding</emph>: The single character to be used as padding (default = the ASCII space " ").</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id791580136219992">MsgBox SF_String.JustifyRight("Title", Length := 10) ' " Title"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id751580136242414">MsgBox SF_String.JustifyRight(" ABCDEF ", Padding := "_") ' "____ABCDEF"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id861580136253164">MsgBox SF_String.JustifyRight("A Long Title", Length := 5) ' "Title"</paragraph>
</bascode>
</section>
<section id="Quote">
<comment> Quote ------------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id241582205281048">
<bookmark_value>String service;Quote</bookmark_value>
</bookmark>
<h2 id="hd_id741580136875363" localize="false">Quote</h2>
<paragraph role="paragraph" id="par_id251580136888958">Returns the input string enclosed in single or double quotes. Existing quotes are left unchanged, including leading and/or trailing quotes.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id321627163052678">
<input>svc.Quote(inputstr: str, [quotechar: str]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id811580136944674"><emph>inputstr</emph>: The string to quote.</paragraph>
<paragraph role="paragraph" id="par_id581599129397412"><emph>quotechar</emph>: Either the single (') or double (") quote (default).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id171580136967087">MsgBox SF_String.Quote("Text Value")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id331612442671018">' "Text Value"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id291580136977341">MsgBox SF_String.Quote("Book Title: ""The Arabian Nights""", "'")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id111612442632444">' 'Book Title: "The Arabian Nights"'</paragraph>
</bascode>
<tip id="par_id911612382537087">This method can be useful while preparing a string field to be stored in a csv-like file, which requires that text values be enclosed with single or double quotes.</tip>
</section>
<section id="ReplaceChar">
<comment> ReplaceChar ------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id971582205313633">
<bookmark_value>String service;ReplaceChar</bookmark_value>
</bookmark>
<h2 id="hd_id171580139110167" localize="false">ReplaceChar</h2>
<paragraph role="paragraph" id="par_id951580139124650">Replaces all occurrences of the characters specified in the <literal>Before</literal> parameter by the corresponding characters specified in <literal>After</literal>.</paragraph>
<paragraph role="paragraph" id="par_id1001612384040018">If the length of <literal>Before</literal> is greater than the length of <literal>After</literal>, the residual characters in <literal>Before</literal> are replaced by the last character in <literal>After</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id191627163199236">
<input>svc.ReplaceChar(inputstr: str, before: str, after: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id11580139160633"><emph>inputstr</emph>: The input string on which replacements will occur.</paragraph>
<paragraph role="paragraph" id="par_id111580139169795"><emph>before</emph>: A string with the characters that will be searched in the input string for replacement.</paragraph>
<paragraph role="paragraph" id="par_id851580139182113"><emph>after</emph>: A string with the new characters that will replace those defined in <literal>before</literal>.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" id="bas_id921580139218457">' Replaces accented characters</paragraph>
<paragraph role="bascode" localize="false" id="bas_id281580139228929">MsgBox SF_String.ReplaceChar("Protégez votre vie privée", "àâãçèéêëîïôöûüýÿ", "aaaceeeeiioouuyy")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id361612384219658">' "Protegez votre vie privee"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id201580139288120">MsgBox SF_String.ReplaceChar("Protégez votre vie privée", "àâãçèéêëîïôöûüýÿ", "")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id401612443219105">' "Protgez votre vie prive"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id661580139301417">MsgBox SF_String.ReplaceChar("àâãçèéêëîïôöûüýÿ", "àâãçèéêëîïôöûüýÿ", "aaaceeeeiioouuyy")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id621612443248643">' "aaaceeeeiioouuyy"</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id151612442904499">The <literal>SF_String</literal> service provides useful public constants for the Latin character sets, as shown in the example below:</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id621580139272513">MsgBox SF_String.ReplaceChar("Protégez votre vie privée", SF_String.CHARSWITHACCENT, SF_String.CHARSWITHOUTACCENT)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id551612443170894">' "Protegez votre vie privee"</paragraph>
</bascode>
</section>
<section id="ReplaceRegex">
<comment> ReplaceRegex ------------------------------------------------------------------------------------------ </comment>
<bookmark localize="false" branch="index" id="bm_id541582205335970">
<bookmark_value>String service;ReplaceRegex</bookmark_value>
</bookmark>
<h2 id="hd_id491580140260181" localize="false">ReplaceRegex</h2>
<paragraph role="paragraph" id="par_id671580140272818">Replaces all occurrences of a given regular expression by a new string.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id21627163307092">
<input>svc.ReplaceRegex(inputstr: str, regex: str, newstr: str, [casesensitive: bool]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id471580140311626"><emph>inputstr</emph>: The input string on which replacements will occur.</paragraph>
<paragraph role="paragraph" id="par_id651580140322666"><emph>regex</emph>: The regular expression.</paragraph>
<paragraph role="paragraph" id="par_id891580140334754"><emph>newstr</emph>: The replacing string.</paragraph>
<paragraph role="paragraph" id="par_id581580140345221"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id151580140386767">MsgBox SF_String.ReplaceRegex("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "[a-z]", "x", CaseSensitive := True)</paragraph>
<paragraph role="bascode" id="bas_id961612384647003">' "Lxxxx xxxxx xxxxx xxx xxxx, xxxxxxxxxxx xxxxxxxxxx xxxx." (each lowercase letter is replaced by "x")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id11580140400163">MsgBox SF_String.ReplaceRegex("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "\b[a-z]+\b", "x", CaseSensitive := False)</paragraph>
<paragraph role="bascode" id="bas_id751612384623936">' "x x x x x, x x x." (each word is replaced by "x")</paragraph>
</bascode>
</section>
<section id="ReplaceStr">
<comment> ReplaceStr -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id751582205356816">
<bookmark_value>String service;ReplaceStr</bookmark_value>
</bookmark>
<h2 id="hd_id701580146458127" localize="false">ReplaceStr</h2>
<paragraph role="paragraph" id="par_id51580146471894">Replaces in a string some or all occurrences of an array of strings by an array of new strings.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id521627163432097">
<input>svc.ReplaceStr(inputstr: str, oldstr: str, newstr: str, [occurrences: int], [casesensitive: bool]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id831580146504326"><emph>inputstr</emph>: The input string on which replacements will occur.</paragraph>
<paragraph role="paragraph" id="par_id411580146514927"><emph>oldstr</emph>: A single string or an array of strings. Zero-length strings are ignored.</paragraph>
<paragraph role="paragraph" id="par_id591580146532966"><emph>newstr</emph>: The replacing string or the array of replacing strings.</paragraph>
<paragraph role="paragraph" id="par_id611612384873347">If <literal>oldstr</literal> is an array, each occurrence of any of the items in <literal>oldstr</literal> is replaced by <literal>newstr</literal>.</paragraph>
<paragraph role="paragraph" id="par_id611612384880820">If <literal>oldstr</literal> and <literal>newstr</literal> are arrays, replacements occur one by one up to the <literal>UBound(newstr)</literal>.</paragraph>
<paragraph role="paragraph" id="par_id241612385058264">If <literal>oldstr</literal> has more entries than <literal>newstr</literal>, then the residual elements in <literal>oldstr</literal> are replaced by the last element in <literal>newstr</literal>.</paragraph>
<paragraph role="paragraph" id="par_id701580146547619"><emph>occurrences</emph>: The maximum number of replacements. The default value is 0, meaning that all occurrences will be replaced.</paragraph>
<paragraph role="paragraph" id="par_id741612385380533">When <literal>oldstr</literal> is an array, the <literal>occurrence</literal> parameter is computed separately for each item in the array.</paragraph>
<paragraph role="paragraph" id="par_id301580146556599"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id481580146574037">MsgBox SF_String.ReplaceStr("100 xxx 200 yyy", Array("xxx", "yyy"), Array("(1)", "(2)"), CaseSensitive := False)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id511612385563994">' "100 (1) 200 (2)"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id151580146611738">MsgBox SF_String.ReplaceStr("abCcdefghHij", Array("c", "h"), Array("Y", "Z"), CaseSensitive := False)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id491612385543543">' "abYYdefgZZij"</paragraph>
</bascode>
</section>
<section id="Represent">
<comment> Represent --------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id151582205374090">
<bookmark_value>String service;Represent</bookmark_value>
</bookmark>
<h2 id="hd_id581580147543150" localize="false">Represent</h2>
<paragraph role="paragraph" id="par_id901580147558931">Returns a string with a readable representation of the argument, truncated at a given length. This is useful mainly for debugging or logging purposes.</paragraph>
<paragraph role="paragraph" id="par_id11612386054691">If the <literal>anyvalue</literal> parameter is an object, it will be enclosed with square brackets "[" and "]".</paragraph>
<paragraph role="paragraph" id="par_id491612386081802">In strings, tabs and line breaks are replaced by \t, \n or \r.</paragraph>
<paragraph role="paragraph" id="par_id921612386089103">If the final length exceeds the <literal>maxlength</literal> parameter, the latter part of the string is replaced by " ... (N)" where N is the total length of the original string before truncation.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id711627163695452">
<input>svc.Represent(anyvalue: any, [maxlength: int]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id91580147593626"><emph>anyvalue</emph>: The input value to be represented. It can be any value, such as a string, an array, a Basic object, a UNO object, etc.</paragraph>
<paragraph role="paragraph" id="par_id811580147609322"><emph>maxlength</emph>: The maximum length of the resulting string. The default value is 0, meaning there is no limit to the length of the resulting representation.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id931580147637178">MsgBox SF_String.Represent("this is a usual string") ' "this is a usual string"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id701580147646290">MsgBox SF_String.Represent("this is a usual string", 15) ' "this i ... (22)"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id1001580147656762">MsgBox SF_String.Represent("this is a" & Chr(10) & " 2-lines string") ' "this is a\n 2-lines string"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id661580147668170">MsgBox SF_String.Represent(Empty) ' "[EMPTY]"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id941580147685721">MsgBox SF_String.Represent(Null) ' "[NULL]"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id531580147702074">MsgBox SF_String.Represent(Pi) ' "3.142"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id461580147719545">MsgBox SF_String.Represent(CreateUnoService("com.sun.star.util.PathSettings")) ' "[com.sun.star.comp.framework.PathSettings]"</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id641612386659292">Note that the representation of data types such as Arrays and <literal>ScriptForge.Dictionary</literal> object instances include both the data type and their values:</paragraph>
<bascode>
<paragraph role="bascode" id="bas_id971612386906463">' An example with a Basic built-in Array</paragraph>
<paragraph role="bascode" localize="false" id="bas_id401580147734722">MsgBox SF_String.Represent(Array(1, 2, "Text" & Chr(9) & "here"))</paragraph>
<paragraph role="bascode" localize="false" id="bas_id311612386778843">' "[ARRAY] (0:2) (1, 2, Text\there)"</paragraph>
<paragraph role="bascode" id="bas_id401612386876329">' An example with a ScriptForge Array</paragraph>
<paragraph role="bascode" localize="false" id="bas_id621612386824731">Dim aValues as Variant</paragraph>
<paragraph role="bascode" localize="false" id="bas_id771612386825586">aValues = SF_Array.RangeInit(1, 5)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id841612386825825">MsgBox SF_String.Represent(aValues)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id121612386864144">' "[ARRAY] (0:4) (1.0, 2.0, 3.0, 4.0, 5.0)"</paragraph>
<paragraph role="bascode" id="bas_id551612386931680">' An example with a ScriptForge Dictionary</paragraph>
<paragraph role="bascode" localize="false" id="bas_id951580147750109">Dim myDict As Variant : myDict = CreateScriptService("Dictionary")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id701580147765158">myDict.Add("A", 1) : myDict.Add("B", 2)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id921580147782281">MsgBox SF_String.Represent(myDict)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id911612386800415">' "[Dictionary] ("A":1, "B":2)"</paragraph>
</bascode>
</section>
<section id="Reverse">
<comment> Reverse ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id111582205394632">
<bookmark_value>String service;Reverse</bookmark_value>
</bookmark>
<h2 id="hd_id781580312915849" localize="false">Reverse</h2>
<paragraph role="paragraph" id="par_id411580312925741">Returns the input string in reversed order.</paragraph>
<paragraph role="paragraph" id="par_id141612387177873">This method is equivalent to the built-in <link href="text/sbasic/shared/03120412.xhp"><literal>StrReverse</literal> Basic function</link>.</paragraph>
<note id="par_id961612387463144">To use the <literal>StrReverse</literal> function, the statement <literal>Option VBASupport 1</literal> must be present in the module.</note>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id951627163820097">
<input>svc.Reverse(inputstr: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id241580312964497"><emph>inputstr</emph>: The string to be reversed.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id671580313005541">MsgBox SF_String.Reverse("abcdefghij") ' "jihgfedcba"</paragraph>
</bascode>
</section>
<section id="SplitLines">
<comment> SplitLines -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id681582205412371">
<bookmark_value>String service;SplitLines</bookmark_value>
</bookmark>
<h2 id="hd_id111580210751549" localize="false">SplitLines</h2>
<paragraph role="paragraph" id="par_id721580210762286">Returns a zero-based array of strings with the lines in the input string. Each item in the array is obtained by splitting the input string at newline characters.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id491627163897526">
<input>svc.SplitLines(inputstr: str, [keepbreaks: int]): str[0..*]</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id481580210806878"><emph>inputstr</emph>: The string to be split.</paragraph>
<paragraph role="paragraph" id="par_id231580210820309"><emph>keepbreaks</emph>: When <literal>True</literal>, line breaks are preserved in the output array (default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id301580210850100">Dim a as Variant</paragraph>
<paragraph role="bascode" localize="false" id="bas_id561580210860646">a = SF_String.SplitLines("Line1" & Chr(10) & "Line2" & Chr(13) & "Line3")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id661612387860556">' a = Array("Line1", "Line2", "Line3")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id791580210888116">a = SF_String.SplitLines("Line1" & Chr(10) & "Line2" & Chr(13) & "Line3" & Chr(10))</paragraph>
<paragraph role="bascode" localize="false" id="bas_id701612387837745">' a = Array("Line1", "Line2", "Line3", "")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id451580210958405">a = SF_String.SplitLines("Line1" & Chr(10) & "Line2" & Chr(13) & "Line3" & Chr(10), KeepBreaks := True)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id591612387824058">' a = Array("Line1\n", "Line2\r", "Line3\n", "")</paragraph>
</bascode>
</section>
<section id="SplitNotQuoted">
<comment> SplitNotQuoted ---------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id531582205451718">
<bookmark_value>String service;SplitNotQuoted</bookmark_value>
</bookmark>
<h2 id="hd_id131580211748939" localize="false">SplitNotQuoted</h2>
<paragraph role="paragraph" id="par_id471580211762739">Splits a string into an array of elements using a specified delimiter.</paragraph>
<paragraph role="paragraph" id="par_id281612388034501">If a quoted substring contains a delimiter, it is ignored. This is useful when parsing CSV-like records that contain quoted strings.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id261627164043199">
<input>svc.SplitNotQuoted(inputstr: str, [delimiter: str], [occurrences: int], [quotechar: str]): str[0..*]</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id881580211809490"><emph>inputstr</emph>: The string to be split.</paragraph>
<paragraph role="paragraph" id="par_id811580211821162"><emph>delimiter</emph>: A string of one or more characters that will be used as delimiter. The default delimiter is the ASCII space " " character.</paragraph>
<paragraph role="paragraph" id="par_id181580211833778"><emph>occurrences</emph>: The maximum number of substrings to return. The default value is 0, meaning that there is no limit to the number of returned strings.</paragraph>
<paragraph role="paragraph" id="par_id421599123777334"><emph>quotechar</emph>: Either the single (') or double (") quote.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id511580211876156">arr1 = SF_String.SplitNotQuoted("abc def ghi")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id581580211857403">' arr1 = Array("abc", "def", "ghi")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id711580211886107">arr2 = SF_String.SplitNotQuoted("abc,""def,ghi""", ",")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id111580211865432">' arr2 = Array("abc", """def,ghi""")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id101580211896350">arr3 = SF_String.SplitNotQuoted("abc,""def\"",ghi""", ",")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id351612388312049"> ' arr3 = Array("abc", """def\"",ghi""")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id591580211905379">arr4 = SF_String.SplitNotQuoted("abc,""def\"",ghi"""",", ",")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id691580211914228">' arr4 = Array("abc", """def\"",ghi""", "")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id831627249262582">svc = CreateScriptService("String")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id981627249260364">arr1 = svc.SplitNotQuoted('abc def ghi')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id871627249262177"># arr1 = ('abc', 'def', 'ghi')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id211627249269827">arr2 = svc.SplitNotQuoted('abc,"def,ghi"', ",")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id11627251280871"># arr2 = ('abc', '"def,ghi"')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id681627251281232">arr3 = svc.SplitNotQuoted(r'abc,"def\",ghi"', ",")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id291627251281439"># arr3 = ('abc', '"def\\",ghi"')</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id81627251281671">arr4 = svc.SplitNotQuoted(r'abc,"def\",ghi"",', ",")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id601627251281871"># arr4 = ('abc', '"def\\",ghi""', '')</paragraph>
</pycode>
<note id="par_id661627251379676">Beware of the differences between Basic and Python when representing strings. For example, in Basic two "" characters inside a string are interpreted as a single " character. In Python, strings enclosed with single quotes can contain " characters without having to double them.</note>
</section>
<section id="StartsWith">
<comment> StartsWith -------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id521582205468821">
<bookmark_value>String service;StartsWith</bookmark_value>
</bookmark>
<h2 id="hd_id121580212826111" localize="false">StartsWith</h2>
<paragraph role="paragraph" id="par_id771580212837884">Returns <literal>True</literal> if the first characters of a string are identical to a given substring.</paragraph>
<paragraph role="paragraph" id="par_id781612393174350">This method returns <literal>False</literal> if either the input string or the substring have a length = 0 or when the substring is longer than the input string.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id211627164196721">
<input>svc.StartsWith(inputstr: str, substring: str, [casesensitive: bool]): bool</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id271580212876135"><emph>inputstr</emph>: The string to be tested.</paragraph>
<paragraph role="paragraph" id="par_id571580212889462"><emph>substring</emph>: The substring to be searched at the start of <literal>inputstr</literal>.</paragraph>
<paragraph role="paragraph" id="par_id811580212900799"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id581580212931342">MsgBox SF_String.StartsWith("abcdefg", "ABC") 'True</paragraph>
<paragraph role="bascode" localize="false" id="bas_id491580212940539">MsgBox SF_String.StartsWith("abcdefg", "ABC", CaseSensitive := True) 'False</paragraph>
</bascode>
</section>
<section id="TrimExt">
<comment> TrimExt ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id461582205488207">
<bookmark_value>String service;TrimExt</bookmark_value>
</bookmark>
<h2 id="hd_id191580295988498" localize="false">TrimExt</h2>
<paragraph role="paragraph" id="par_id911580295999690">Returns the input string without its leading and trailing whitespaces.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id241627164299510">
<input>svc.TrimExt(inputstr: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id541580296044377"><emph>inputstr</emph>: The string to trim.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id231580296079929">MsgBox SF_String.TrimExt(" Some text. ") ' "Some text."</paragraph>
<paragraph role="bascode" localize="false" id="bas_id871580296091857">MsgBox SF_String.TrimExt(" ABCDEF" & Chr(9) & Chr(10) & Chr(13) & " ") ' "ABCDEF"</paragraph>
</bascode>
</section>
<section id="Unescape">
<comment> Unescape ---------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id651582205521725">
<bookmark_value>String service;Unescape</bookmark_value>
</bookmark>
<h2 id="hd_id831580483080098" localize="false">Unescape</h2>
<paragraph role="paragraph" id="par_id61580483096936">Converts any escaped sequence (\\, \n, \r, \t) in the input string to their corresponding ASCII character.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id51627164365699">
<input>svc.Unescape(inputstr: str): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id971580483124743"><emph>inputstr</emph>: The string to be converted.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id601580483196328">MsgBox SF_String.Unescape("abc\n\tdef\\n")</paragraph>
<paragraph role="bascode" localize="false" id="bas_id261580483205906">' "abc" & Chr(10) & Chr(9) & "def\n"</paragraph>
</bascode>
</section>
<section id="Unquote">
<comment> Unquote ----------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id471582205541341">
<bookmark_value>String service;Unquote</bookmark_value>
</bookmark>
<h2 id="hd_id481580213622428" localize="false">Unquote</h2>
<paragraph role="paragraph" id="par_id831580213634029">Removes the single or double quotes enclosing the input string.</paragraph>
<paragraph role="paragraph" id="par_id811612393585600">This is useful when parsing CSV-like records that contain quoted strings.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id391627164432930">
<input>svc.Unquote(inputstr: str, [quotechar: str]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id761580213677493"><emph>inputstr</emph>: The string to unquote.</paragraph>
<paragraph role="paragraph" id="par_id211599129509890"><emph>quotechar</emph>: Either the single (') or double (") quote (default).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id371580213703732">Dim s as String</paragraph>
<paragraph role="bascode" id="bas_id371580213702598">' s = "Some text" (without enclosing quotes)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id981580213799125">s = SF_String.Unquote("""Some text""")</paragraph>
<paragraph role="bascode" id="bas_id51580213693694">' The string below does not have enclosing quotes, so it remains unchanged</paragraph>
<paragraph role="bascode" id="bas_id961612393917830">' s = "Some text" (unchanged)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id961612393917927">s = SF_String.Unquote("Some text")</paragraph>
<paragraph role="bascode" id="bas_id461612394182689">' Quotes inside the string are not removed</paragraph>
<paragraph role="bascode" id="bas_id961612394171208">' s = "The ""true"" meaning" (unchanged)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id961612394171186">s = SF_String.Unquote("The ""true"" meaning")</paragraph>
</bascode>
</section>
<section id="Wrap">
<comment> Wrap ------------------------------------------------------------------------------------------------- </comment>
<bookmark localize="false" branch="index" id="bm_id321585834468367">
<bookmark_value>String service;Wrap</bookmark_value>
</bookmark>
<h2 id="hd_id911585834468456" localize="false">Wrap</h2>
<paragraph role="paragraph" id="par_id871585834468102">Converts the input string into an array of substrings so that each item in the array has at most a given number of characters.</paragraph>
<paragraph role="paragraph" id="par_id21612394465120">In practice, this method returns a zero-based array of output lines, without newlines at the end, except for the pre-existing line-breaks.</paragraph>
<paragraph role="paragraph" id="par_id601612395193333">Tabs are expanded using the same procedure performed by the <link href="text/sbasic/shared/03/sf_string.xhp#ExpandTabs">ExpandTabs</link> method.</paragraph>
<paragraph role="paragraph" id="par_id641612394826616">Symbolic line breaks are replaced by their equivalent ASCII characters.</paragraph>
<paragraph role="paragraph" id="par_id361612394859733">If the wrapped output has no content, the returned array is empty.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id41627164529595">
<input>svc.Wrap(inputstr: str, [width: int], [tabsize: int]): str</input>
</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id251585834468498"><emph>inputstr</emph>: The string to wrap.</paragraph>
<paragraph role="paragraph" id="par_id351585834773177"><emph>width</emph>: The maximum number of characters in each line (Default = 70).</paragraph>
<paragraph role="paragraph" id="par_id741585834874500"><emph>tabsize</emph>: Before wrapping the text, the existing TAB <literal>Chr(9)</literal> characters are replaced with spaces. The argument <literal>tabsize</literal> defines the TAB stops at TabSize + 1, 2 * TabSize + 1 , ... N * TabSize + 1 (Default = 8).</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id461585835162853">a = "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."</paragraph>
<paragraph role="bascode" localize="false" id="bas_id891585835170534">b = SF_String.Wrap(a, 20)</paragraph>
<paragraph role="bascode" localize="false" id="bas_id191585835179883">' Array("Neque porro ", "quisquam est qui ", "dolorem ipsum quia ", "dolor sit amet, ", "consectetur, ", "adipisci velit...")</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id221627251731306">a = "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id411627251731572">b = svc.Wrap(a, 20)</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id921627251731739"># ('Neque porro ', 'quisquam est qui ', 'dolorem ipsum quia ', 'dolor sit amet, ', 'consectetur, ', 'adipisci velit...')</paragraph>
</pycode>
</section>
<embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/>
<section id="relatedtopics">
<embed href="text/sbasic/shared/03/sf_array.xhp#ArrayService"/>
<embed href="text/sbasic/shared/03120202.xhp#String_h1"/>
</section>
</body>
</helpdocument>
|