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 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleStringUtils</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<h1 class="unit">Unit CastleStringUtils</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Uses">Uses</a></td><td><a class="section" href="#PasDoc-Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section" href="#PasDoc-FuncsProcs">Functions and Procedures</a></td><td><a class="section" href="#PasDoc-Types">Types</a></td><td><a class="section" href="#PasDoc-Constants">Constants</a></td><td>Variables</td></tr></table>
<a name="PasDoc-Description"></a><h2 class="description">Description</h2>
<p>
String utilities. Also some operations on chars and PChars. And various convertions strings<->numbers.
<p>General comments for all procedures that have parameter like IgnoreCase: </p>
<ul class="paragraph_spacing">
<li><p> If such parameter has some default value, this default value should be </p>
<dl class="paragraph_spacing">
<dt><code>True</code></dt>
<dd><p>for procedures that only read processed string</p></dd>
<dt><code>False</code></dt>
<dd><p>for procedures that can modify processed string (for safety, so that accidental modification should be harder)</p></dd>
</dl>
<p></p></li>
<li><p> If I don't write in docs for this procedure whether this procedure takes current locale into account (as current locale can change the meaning of "ignoring case"), then it means it <i>does</i> take current locale into account.</p></li>
</ul>
<p></p>
<a name="PasDoc-Uses"></a><h2 class="uses">Uses</h2>
<ul class="useslist"><li>SysUtils</li><li><a href="CastleUtils.html">CastleUtils</a></li><li>Classes</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
<table class="classestable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="CastleStringUtils.TCastleStringList.html"><code>TCastleStringList</code></a></td>
<td class="itemdesc">List of strings.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="CastleStringUtils.EDeformatError.html"><code>EDeformatError</code></a></td>
<td class="itemdesc"> </td>
</tr>
<tr class="list">
<td class="itemname">record <a class="bold" href="CastleStringUtils.TPercentReplace.html"><code>TPercentReplace</code></a></td>
<td class="itemdesc"> </td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="CastleStringUtils.EUnknownPercentFormat.html"><code>EUnknownPercentFormat</code></a></td>
<td class="itemdesc"> </td>
</tr>
</table>
<a name="PasDoc-FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#RandomString">RandomString</a></b>: string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>procedure <b><a href="CastleStringUtils.html#StringReplaceAllTo1st">StringReplaceAllTo1st</a></b>(var S: string; const FromPattern, ToPattern: string; IgnoreCase: boolean = true); overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#BreakLine">BreakLine</a></b>(const s: string; MaxCol: integer; onbreakChars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SDeleteChars">SDeleteChars</a></b>(const s: string; const excludedChars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SReplaceChars">SReplaceChars</a></b>(const s, FromChars, ToChars: string): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SReplaceChars">SReplaceChars</a></b>(const s: string; FromChars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; ToChar: char): string; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SReplaceChars">SReplaceChars</a></b>(const s: string; FromChar, ToChar: char): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SPad">SPad</a></b>(const s: string; len: integer; c: char = ' '): string; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SZeroPad">SZeroPad</a></b>(const s: string; len: integer): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#LoCase">LoCase</a></b>(c: char): char;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#CharPos">CharPos</a></b>(c: char; const s: string; Offset: Integer = 1): integer;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#CharsPos">CharsPos</a></b>(const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; const s: string): integer;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#CharsPosEx">CharsPosEx</a></b>(const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; const s: string; Offset: Integer): integer;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#BackCharsPos">BackCharsPos</a></b>(const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; const s: string): integer;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#BackPos">BackPos</a></b>(const SubString, S: string): Integer; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#BackPos">BackPos</a></b>(const SubString: char; const S: string): Integer; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#FirstDelimiter">FirstDelimiter</a></b>(const Delimiters, S: string): Integer;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SEnding">SEnding</a></b>(const s: string; P: integer): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IsPrefix">IsPrefix</a></b>(const Prefix, S: string; IgnoreCase: boolean = true): boolean; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IsSuffix">IsSuffix</a></b>(const Suffix, S: string; IgnoreCase: boolean = true): boolean; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#PrefixRemove">PrefixRemove</a></b>(const Prefix, S: string; IgnoreCase: boolean): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SuffixRemove">SuffixRemove</a></b>(const Suffix, S: string; IgnoreCase: boolean): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>procedure <b><a href="CastleStringUtils.html#SAppendData">SAppendData</a></b>(var s: string; const Data; DataSize: integer);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SChar">SChar</a></b>(const s: string; CharNum: integer): PChar;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SCharIs">SCharIs</a></b>(const s: string; index: integer; c: char): boolean; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SCharIs">SCharIs</a></b>(const s: string; index: integer; const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>): boolean; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SReadableForm">SReadableForm</a></b>(const s: string): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#CopyPos">CopyPos</a></b>(const s: string; StartPosition, EndPosition: integer): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>procedure <b><a href="CastleStringUtils.html#DeletePos">DeletePos</a></b>(var S: string; StartPosition, EndPosition: Integer);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#NextToken">NextToken</a></b>(const S: string; var SeekPos: Integer; const TokenDelims: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#NextTokenOnce">NextTokenOnce</a></b>(const s: string; SeekPos: integer = 1; const TokenDelims: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#CreateTokens">CreateTokens</a></b>(const s: string; const TokenDelims: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): <a href="CastleStringUtils.TCastleStringList.html">TCastleStringList</a>;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#FindPos">FindPos</a></b>(const SubText, Text: string; StartPosition, Count: integer; const Options: <a href="CastleStringUtils.html#TSearchOptions">TSearchOptions</a>; const WordBorders: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#DefaultWordBorders">DefaultWordBorders</a>): integer; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SRight">SRight</a></b>(const s: string; const rpart: integer): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SAppendPart">SAppendPart</a></b>(const s, PartSeparator, NextPart: string): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#FileToString">FileToString</a></b>(const URL: string; const AllowStdIn: boolean; out MimeType: string): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#FileToString">FileToString</a></b>(const URL: string; const AllowStdIn: boolean = false): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>procedure <b><a href="CastleStringUtils.html#StringToFile">StringToFile</a></b>(const URL, contents: string);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>procedure <b><a href="CastleStringUtils.html#DeFormat">DeFormat</a></b>(Data: string; const Format: string; const args: array of pointer; const IgnoreCase: boolean = true; const RelaxedWhitespaceChecking: boolean = true); overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#TryDeFormat">TryDeFormat</a></b>(Data: string; const Format: string; const args: array of pointer; const IgnoreCase: boolean = true; const RelaxedWhitespaceChecking: boolean = true): integer; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>procedure <b><a href="CastleStringUtils.html#GetFileFilterExts">GetFileFilterExts</a></b>(const FileFilter: string; Extensions: TStringList);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#GetFileFilterName">GetFileFilterName</a></b>(const FileFilter: string): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#GetFileFilterExtsStr">GetFileFilterExtsStr</a></b>(const FileFilter: string): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SReplacePatterns">SReplacePatterns</a></b>(const s: string; const patterns, values: array of string; const Options: <a href="CastleStringUtils.html#TSearchOptions">TSearchOptions</a>): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SReplacePatterns">SReplacePatterns</a></b>(const s: string; const patterns, values: TStrings; const Options: <a href="CastleStringUtils.html#TSearchOptions">TSearchOptions</a>): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SCharsCount">SCharsCount</a></b>(const s: string; c: char): Cardinal; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SCharsCount">SCharsCount</a></b>(const s: string; const Chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>): Cardinal; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#STruncateHash">STruncateHash</a></b>(const s: string): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SUnformattable">SUnformattable</a></b>(const s: string): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SAnsiCompare">SAnsiCompare</a></b>(const s1, s2: string; IgnoreCase: boolean): Integer;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SAnsiSame">SAnsiSame</a></b>(const s1, s2: string; IgnoreCase: boolean): boolean;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SPercentReplace">SPercentReplace</a></b>(const InitialFormat: string; const Replaces: array of <a href="CastleStringUtils.TPercentReplace.html">TPercentReplace</a>; out ReplacementsDone: Cardinal; ErrorOnUnknownPercentFormat: boolean = true; PercentChar: char ='%'; IgnoreCase: boolean = false): string; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SPercentReplace">SPercentReplace</a></b>(const InitialFormat: string; const Replaces: array of <a href="CastleStringUtils.TPercentReplace.html">TPercentReplace</a>; ErrorOnUnknownPercentFormat: boolean = true; PercentChar: char ='%'; IgnoreCase: boolean = false): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#FormatNameCounter">FormatNameCounter</a></b>(const NamePattern: string; const Index: Integer; const AllowOldPercentSyntax: boolean; out ReplacementsDone: Cardinal): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#FormatNameCounter">FormatNameCounter</a></b>(const NamePattern: string; const Index: Integer; const AllowOldPercentSyntax: boolean): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#DigitAsChar">DigitAsChar</a></b>(b: byte): char;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#DigitAsByte">DigitAsByte</a></b>(c: char): byte;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStrZPad">IntToStrZPad</a></b>(n: integer; minLength: integer): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStrBase">IntToStrBase</a></b>(const n: Int64; Base: Byte): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStrBase">IntToStrBase</a></b>( n: QWord; Base: Byte): string; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStrBase">IntToStrBase</a></b>(const n: Int64; Base: Byte; minLength: Cardinal): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStrBase">IntToStrBase</a></b>(const n: QWord; Base: Byte; minLength: Cardinal): string; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStr2">IntToStr2</a></b>(n: Int64; const MinLength: Cardinal = 1; const ZeroDigit: char = '0'; const OneDigit: char = '1'; const MinusSign: char = '-'): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStr16">IntToStr16</a></b>(const n: Int64; const minLength: Cardinal = 1): string; overload;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#IntToStr16">IntToStr16</a></b>(const n: QWord; const minLength: Cardinal = 1): string; overload;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#PointerToStr">PointerToStr</a></b>(Ptr: Pointer): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#Str2ToInt">Str2ToInt</a></b>(const s: string): integer;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#StrHexToInt">StrHexToInt</a></b>(const s: string): Int64;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#StrToFloatDef">StrToFloatDef</a></b>(const s: string; DefValue: Extended): Extended;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SetToStr">SetToStr</a></b>(const SetVariable; NumStart, NumEnd: byte): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#PCharOrNil">PCharOrNil</a></b>(const s: string): PChar;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a href="CastleStringUtils.html#SCompressWhiteSpace">SCompressWhiteSpace</a></b>(const S: string): string;</code></td>
</tr>
</table>
<a name="PasDoc-Types"></a><h3 class="summary">Types</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#TDynamicStringArray">TDynamicStringArray</a></b> = array of string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#TSearchOptions">TSearchOptions</a></b> = set of (soMatchCase, soWholeWord, soBackwards);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a></b> = SysUtils.TSysCharSet;</code></td>
</tr>
</table>
<a name="PasDoc-Constants"></a><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#AllChars">AllChars</a></b> = [Low(Char) .. High(Char)];</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#DefaultWordBorders">DefaultWordBorders</a></b> = <a href="CastleStringUtils.html#AllChars">AllChars</a> - ['a'..'z', 'A'..'Z', '0'..'9', '_'];</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a></b> = [' ', #9, #10, #13];</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#SimpleAsciiCharacters">SimpleAsciiCharacters</a></b> = [#32 .. #126];</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#BoolToStr">BoolToStr</a></b>: array[boolean] of string=('FALSE','TRUE');</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#BoolToStrYesNo">BoolToStrYesNo</a></b>: array[boolean]of string = ('No','Yes');</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlA">CtrlA</a></b> = Chr(Ord('a') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlB">CtrlB</a></b> = Chr(Ord('b') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlC">CtrlC</a></b> = Chr(Ord('c') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlD">CtrlD</a></b> = Chr(Ord('d') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlE">CtrlE</a></b> = Chr(Ord('e') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlF">CtrlF</a></b> = Chr(Ord('f') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlG">CtrlG</a></b> = Chr(Ord('g') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlH">CtrlH</a></b> = Chr(Ord('h') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlI">CtrlI</a></b> = Chr(Ord('i') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlJ">CtrlJ</a></b> = Chr(Ord('j') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlK">CtrlK</a></b> = Chr(Ord('k') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlL">CtrlL</a></b> = Chr(Ord('l') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlM">CtrlM</a></b> = Chr(Ord('m') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlN">CtrlN</a></b> = Chr(Ord('n') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlO">CtrlO</a></b> = Chr(Ord('o') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlP">CtrlP</a></b> = Chr(Ord('p') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlQ">CtrlQ</a></b> = Chr(Ord('q') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlR">CtrlR</a></b> = Chr(Ord('r') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlS">CtrlS</a></b> = Chr(Ord('s') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlT">CtrlT</a></b> = Chr(Ord('t') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlU">CtrlU</a></b> = Chr(Ord('u') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlV">CtrlV</a></b> = Chr(Ord('v') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlW">CtrlW</a></b> = Chr(Ord('w') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlX">CtrlX</a></b> = Chr(Ord('x') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlY">CtrlY</a></b> = Chr(Ord('y') - Ord('a') + 1);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CtrlZ">CtrlZ</a></b> = Chr(Ord('z') - Ord('a') + 1);</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CharBackSpace">CharBackSpace</a></b> = #8;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CharTab">CharTab</a></b> = #9;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CharEnter">CharEnter</a></b> = #13;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CharEscape">CharEscape</a></b> = #27;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a href="CastleStringUtils.html#CharDelete">CharDelete</a></b> = #127;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Functions and Procedures</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="RandomString"></a><code>function <b>RandomString</b>: string;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="StringReplaceAllTo1st"></a><code>procedure <b>StringReplaceAllTo1st</b>(var S: string; const FromPattern, ToPattern: string; IgnoreCase: boolean = true); overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Replace all occurrences of FromPattern string to ToPattern string, within another string S.
<p><code><code>StringReplaceAllTo1st</code>(s, from, to)</code> is actually equivalent to simply <code>s := StringReplace(s, from, to, [rfReplaceAll, rfIgnoreCase])</code>. So <code>StringReplaceAllTo1st</code> is just a wrapper for very common use case of StringReplace.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="BreakLine"></a><code>function <b>BreakLine</b>(const s: string; MaxCol: integer; onbreakChars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Insert newline characters into string S, such that each line has at most MaxCol chars. Newline characters inserted is <a class="normal" href="CastleUtils.html#NL">NL</a>.
<p>It tries to insert <a class="normal" href="CastleUtils.html#NL">NL</a> at the last character in OnBreakChars but still before MaxCol limit, and the character in OnBreakChars is deleted in this case. In other words, in most typical situation it simply breaks the string where the whitespace is, trying to make the line as long as possible within MaxCol limit. If no such character in OnBreakChars is found (e.g., you put a long line of non-<a class="normal" href="CastleColors.html#White">white</a> characters), it will still break the string at MaxCol position (so in this exceptional case, it will cause a break in the middle of the word).
<p>While breaking the string in the middle of the word in not nice, this allows us a safe feeling that this will always break the string into MaxCol chunks.
<p>This intelligently recognizes already existing newline characters (#13, #10, #13#10 or #10#13) in the string, so e.g. it will not insert more newline characters when they are not necessary.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SDeleteChars"></a><code>function <b>SDeleteChars</b>(const s: string; const excludedChars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns S with all chars in ExcludedChars deleted.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SReplaceChars"></a><code>function <b>SReplaceChars</b>(const s, FromChars, ToChars: string): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Replace all occurrences of characters in FromChars with the new string / character. There are three overloaded versions:
<p></p>
<ol class="paragraph_spacing">
<li value="1"><p><a class="normal" href="CastleStringUtils.html#SReplaceChars">SReplaceChars</a>(string, string, string) looks in S for characters within FromChars, and replaces them with characters on appropriate position in ToChars. For example, <a class="normal" href="CastleStringUtils.html#SReplaceChars">SReplaceChars</a>(S, 'ab', 'cd') replaces all occurrences of 'a' into 'c' and all occurrences of 'b' into 'd'. It must always be Length(FromChars) <= Length(ToChars).</p></li>
<li value="2"><p><a class="normal" href="CastleStringUtils.html#SReplaceChars">SReplaceChars</a>(string, <a class="normal" href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>, char) replaces all occurrences of any character in given set with the one specified character.</p></li>
<li value="3"><p><a class="normal" href="CastleStringUtils.html#SReplaceChars">SReplaceChars</a>(string, char, char) simply replaces all occurrences of one character into another.</p></li>
</ol>
<p>
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SReplaceChars"></a><code>function <b>SReplaceChars</b>(const s: string; FromChars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; ToChar: char): string; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SReplaceChars"></a><code>function <b>SReplaceChars</b>(const s: string; FromChar, ToChar: char): string; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SPad"></a><code>function <b>SPad</b>(const s: string; len: integer; c: char = ' '): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Pad (fill from the left with character C) string S, until length of resulting string is at least Len.
<p>For example, <code><code>SPad</code>('29', 4, '0')</code> gives '0029'</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SZeroPad"></a><code>function <b>SZeroPad</b>(const s: string; len: integer): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Pad (fill from the left) with zeros string S, until length of resulting string is at least Len. It's actually just a shortcut for <a class="normal" href="CastleStringUtils.html#SPad">SPad</a> with padding character set to '0'.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="LoCase"></a><code>function <b>LoCase</b>(c: char): char;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert uppercase letters to lowercase. Analogous to UpCase. Doesn't change other characters. Just like UpCase, this doesn't take current locale into account, and works only on English A-Z -> a-z letters.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharPos"></a><code>function <b>CharPos</b>(c: char; const s: string; Offset: Integer = 1): integer;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharsPos"></a><code>function <b>CharsPos</b>(const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; const s: string): integer;</code></td>
</tr>
<tr><td colspan="1">
<p>
Find first occurrence of any character in Chars in string S. This is quite like <a class="normal" href="CastleStringUtils.html#FirstDelimiter">FirstDelimiter</a> but it takes parameter as <a class="normal" href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> and has much more sensible name.
<p><a class="normal" href="CastleStringUtils.html#BackCharsPos">BackCharsPos</a> does the same, but from the end of the string (i.e. finds the last occurrence).
<p><a class="normal" href="CastleStringUtils.html#CharsPosEx">CharsPosEx</a> searches starting from Offset char.
<p>They all return 0 if not found.
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharsPosEx"></a><code>function <b>CharsPosEx</b>(const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; const s: string; Offset: Integer): integer;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="BackCharsPos"></a><code>function <b>BackCharsPos</b>(const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>; const s: string): integer;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="BackPos"></a><code>function <b>BackPos</b>(const SubString, S: string): Integer; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Find <b>last</b> occurrence of SubString within S. 0 if not found. Overloaded version is optimized for searching for single character.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="BackPos"></a><code>function <b>BackPos</b>(const SubString: char; const S: string): Integer; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FirstDelimiter"></a><code>function <b>FirstDelimiter</b>(const Delimiters, S: string): Integer;</code></td>
</tr>
<tr><td colspan="1">
<p>
Find first occurrence of character in Delimiters. Name is analogous to LastDelimiter. Returns 0 if not found.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SEnding"></a><code>function <b>SEnding</b>(const s: string; P: integer): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns suffix of S starting from position P. Returns '' if P > length(S). Yes, this is simply equivalent to Copy(S, P, MaxInt).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IsPrefix"></a><code>function <b>IsPrefix</b>(const Prefix, S: string; IgnoreCase: boolean = true): boolean; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IsSuffix"></a><code>function <b>IsSuffix</b>(const Suffix, S: string; IgnoreCase: boolean = true): boolean; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="PrefixRemove"></a><code>function <b>PrefixRemove</b>(const Prefix, S: string; IgnoreCase: boolean): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Removes the prefix, if it is present. More precisely, if <a class="normal" href="CastleStringUtils.html#IsPrefix">IsPrefix</a>(Prefix, S, IgnoreCase) then returns S with this prefix removed. Else returns S.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SuffixRemove"></a><code>function <b>SuffixRemove</b>(const Suffix, S: string; IgnoreCase: boolean): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Like <a class="normal" href="CastleStringUtils.html#PrefixRemove">PrefixRemove</a>, but checks for and removes Suffix.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SAppendData"></a><code>procedure <b>SAppendData</b>(var s: string; const Data; DataSize: integer);</code></td>
</tr>
<tr><td colspan="1">
<p>
Appends to a string S DataSize bytes from Data.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SChar"></a><code>function <b>SChar</b>(const s: string; CharNum: integer): PChar;</code></td>
</tr>
<tr><td colspan="1">
<p>
A pointer to S[CharNum], that is just @S[CharNum], avoiding range checking.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SCharIs"></a><code>function <b>SCharIs</b>(const s: string; index: integer; c: char): boolean; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Check whether S[Index] = C, also checking is Index within S length. Return false if S is too short, or the chatacter differs.
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SCharIs"></a><code>function <b>SCharIs</b>(const s: string; index: integer; const chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>): boolean; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SReadableForm"></a><code>function <b>SReadableForm</b>(const s: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Replace typically unreadable characters in string S with #number notation. Useful for printing strings with some unprintable chars for debugging purposes.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CopyPos"></a><code>function <b>CopyPos</b>(const s: string; StartPosition, EndPosition: integer): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Return S[StartPosition..EndPosition]. This is similar to standard Copy procedure, but last parameter is EndPosition instead of Count, which is more comfortable sometimes.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="DeletePos"></a><code>procedure <b>DeletePos</b>(var S: string; StartPosition, EndPosition: Integer);</code></td>
</tr>
<tr><td colspan="1">
<p>
Delete from S range of characters [StartPosition..EndPosition]. Analogous to standard Delete but with EndPosition parameter (while standard Delete takes Count).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="NextToken"></a><code>function <b>NextToken</b>(const S: string; var SeekPos: Integer; const TokenDelims: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Find next part in the string S separated by delimiters TokenDelims. More precisely: search S, starting from position SeekPos, for the first character that is <i>not in TokenDelims</i>. Then, all subsequent characters that are not in TokenDelims are appended to the Result, until any character <i>is in TokenDelims</i> is found. In effect, Result contains the whole part that was in TokenDelims.
<p>SeekPos is advanced to the position of the next character, i.e. the character right after the ending character that was in TokenDelims. In other words, SeekPos points to the position of the next "unprocessed" character in string S. Often you will want to make another call to <code>NextToken</code>, passing this SeekPos, and this way you can split your string S into parts delimited by TokenDelims.
<p>Returns '' if no more tokens available (SeekPos value at the end is unspecified).
<p>Typical use scenario (iterate over all tokens in the string) :
<p></p>
<pre class="longcode">
SeekPos := <span class="pascal_numeric">1</span>;
<span class="pascal_keyword">repeat</span>
Token := NextToken(S, SeekPos);
<span class="pascal_keyword">if</span> Token = <span class="pascal_string">''</span> <span class="pascal_keyword">then</span> break;
<span class="pascal_comment">{ ... process_next_token (Token) ... }</span>
<span class="pascal_keyword">until</span> false;
</pre>
<p>
<p>The above example will split the string into parts separated by whitespace.
<p>Note: it's much easier to use <a class="normal" href="CastleStringUtils.html#CreateTokens">CreateTokens</a> instead of this procedure. But this procedure gives you quite more flexibility.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="NextTokenOnce"></a><code>function <b>NextTokenOnce</b>(const s: string; SeekPos: integer = 1; const TokenDelims: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
<code>NextTokenOnce</code> works just like <a class="normal" href="CastleStringUtils.html#NextToken">NextToken</a>, but doesn't advance the SeekPos position. This means that it's quite useless when you're interested in <i>all</i> tokens inside some string, but it's also more comfortable when you're interested in only <i>one</i> token inside some string. When SeekPos = 1, this is the first token.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CreateTokens"></a><code>function <b>CreateTokens</b>(const s: string; const TokenDelims: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#WhiteSpaces">WhiteSpaces</a>): <a href="CastleStringUtils.TCastleStringList.html">TCastleStringList</a>;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns <a class="normal" href="CastleStringUtils.TCastleStringList.html">TCastleStringList</a> with tokens extracted from S. Token is something delimited by TokenDelims. TokenDelims are not contained in resulting items. E.g. <code>CreateTokens</code>('foo, bar', [' ', ',']) returns <a class="normal" href="CastleStringUtils.TCastleStringList.html">TCastleStringList</a> with 2 items: 'foo' and 'bar'.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FindPos"></a><code>function <b>FindPos</b>(const SubText, Text: string; StartPosition, Count: integer; const Options: <a href="CastleStringUtils.html#TSearchOptions">TSearchOptions</a>; const WordBorders: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a> = <a href="CastleStringUtils.html#DefaultWordBorders">DefaultWordBorders</a>): integer; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Find substring SubText within Text. Returns 0 if not found. Similar to a standard Pos function, with some improvements.
<p>
<p>
<p></p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>StartPosition</dt>
<dd>Starts searching for SubText starting from this position. Note that the resulting position is still returned with respect to the string beginning. Just like standard PosEx.</dd>
<dt>Count</dt>
<dd>Looks only at Count characters from Text. You can say that the search is done only within Copy(Text, StartPosition, Count).</dd>
<dt>Options</dt>
<dd>Various searching options:
<p></p>
<ul class="paragraph_spacing">
<li><p>soMatchCase: makes searching case-sensitive (by default, case is ignored, taking locale into account).</p></li>
<li><p>soWholeWord: looks only for SubText occurrences surrounded by characters from WordBorders (or the beginning/end of Text).
<p>Note that, while the beginning/end of Text is always treated like a word border, but the mere beginning/end of the searching range (StartPosition, Count) is not a word border. For example <code>FindPos</code>('cat', 'foocat dog', 4, MaxInt, [soWholeWord]) will answer 0 (not found), because the only 'cat' occurrence is not surrounded by default word borders.</p></li>
<li><p>soBackwards: search from the end, that is return rightmost found occurrence.</p></li>
</ul>
<p></dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SRight"></a><code>function <b>SRight</b>(const s: string; const rpart: integer): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Return rightmost RPart characters from S. If RPart > Length(S) then returns S.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SAppendPart"></a><code>function <b>SAppendPart</b>(const s, PartSeparator, NextPart: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
If S = '' then returns NextPart, else returns S + PartSeparator + NextPart.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FileToString"></a><code>function <b>FileToString</b>(const URL: string; const AllowStdIn: boolean; out MimeType: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Read file or URL contents to a string. MimeType is returned, calculated just like the <a class="normal" href="CastleDownload.html#Download">Download</a> function. If AllowStdIn, then URL = '-' (one dash) is treated specially: it means to read contents from standard input (stdin, Input in Pascal).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FileToString"></a><code>function <b>FileToString</b>(const URL: string; const AllowStdIn: boolean = false): string;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="StringToFile"></a><code>procedure <b>StringToFile</b>(const URL, contents: string);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="DeFormat"></a><code>procedure <b>DeFormat</b>(Data: string; const Format: string; const args: array of pointer; const IgnoreCase: boolean = true; const RelaxedWhitespaceChecking: boolean = true); overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Parse a string according to the given format, returning the values corresponding to placeholders %x in format string.
<p>Format parameter is a sequence of <a class="normal" href="CastleColors.html#White">white</a> spaces, placeholders like %d or %f, and other characters. More precisely:
<p></p>
<ul class="paragraph_spacing">
<li><p>If RelaxedWhitespaceChecking = <code>True</code> (that's the default value) then 1 or more <a class="normal" href="CastleColors.html#White">white</a> spaces in Format must correspond to 1 or more any whitespace characters in Data. I.e., the actual number and kind of whitespace in Format and Data doesn't have to match — it's only important that <i>some whitespace in Format</i> correspond to <i>some whitespace in Data</i>.</p></li>
<li><p><code>%d</code> in Format means an integer value (possibly signed) in Data. Args should have a pointer to Integer variable on the appropriate position.</p></li>
<li><p><code>%f</code> in Format means a float value (possibly signed, possibly with a dot) in Data. Args should have a pointer to Float variable on the appropriate position.</p></li>
<li><p><code>%.single.</code>, <code>%.double.</code>, <code>%.extended.</code> are like <code>%f</code>, but they specify appropriate variable type in Args. Since <code>DeFormat</code> can't check the type validity of your pointers, always be sure to pass in Args pointers to appropriate types.</p></li>
<li><p><code>%s</code> in Format means a string (will end on the first whitespace) in Data. Args should contain a pointer to an AnsiString on the appropriate position. Note that I mean it — a pointer to an AnsiString, not just a string typecasted into a pointer. I.e., if S is AnsiString, Args should contain @S, not Pointer(S).
<p>Note that a string may be empty in some cases, e.g. Format = '%d %s' and Data = '123 ' will result in the empty string as second Args.</p></li>
<li><p><code>%%</code> in Format means a one % sign in Data.</p></li>
<li><p>All the other characters (non-<a class="normal" href="CastleColors.html#White">white</a>, not %x sequences above) should be present in Data exactly like they are specified in Format. IgnoreCase controls is the letter case checked. When RelaxedWhitespaceChecking = <code>False</code> then <a class="normal" href="CastleColors.html#White">white</a>-space characters are treated just like non-<a class="normal" href="CastleColors.html#White">white</a> chars: they must match exactly between Format and Data.</p></li>
</ul>
<p>
<p>Format must always match the whole Data — in other words, when we finished reading the Format, Data should be finished too. The exception is at the beginning and end of Data, if RelaxedWhitespaceChecking = <code>True</code> : then at the beginning and end of Data any number of <a class="normal" href="CastleColors.html#White">white</a>-space is allowed.
<p>For <code>DeFormat</code>, the opposite must also be true: when we finished reading Data, Format should be finished too. However, for <a class="normal" href="CastleStringUtils.html#TryDeFormat">TryDeFormat</a>, it's allowed for Data to end prematurely. <a class="normal" href="CastleStringUtils.html#TryDeFormat">TryDeFormat</a> returns how many Args were initialized.
<p>Note that while usually you will want RelaxedWhitespaceChecking = <code>True</code>, sometimes it can be needed to set this to <code>False</code> not only to get strickter checking, but also to get some things matching that otherwise wouldn't match. For example, consider Data = 'first second apple' and Format = 'first %s second %s'. With RelaxedWhitespaceChecking these things <i>do not match</i> — because the 1st space character in the Format string "consumes" the 1st and 2nd space characters in the Data. Then '%s' is matched to the word 'second', and the word 'second' is compared with 'apple' and they do not match. If you want such Data and Format to match, you must pass RelaxedWhitespaceChecking = <code>True</code>. Then the first '%s' will be matched to '' (empty string).
<p>This was written because both JclSscanf and scanf units were buggy. (see openGL.testy/nehe10).
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleStringUtils.EDeformatError.html">EDeformatError</a></dt>
<dd>In case of any error — mismatch between Format and Data. Note that in case of error, some of Args may be initialized, and some not — no guarantees here, sorry.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TryDeFormat"></a><code>function <b>TryDeFormat</b>(Data: string; const Format: string; const args: array of pointer; const IgnoreCase: boolean = true; const RelaxedWhitespaceChecking: boolean = true): integer; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="GetFileFilterExts"></a><code>procedure <b>GetFileFilterExts</b>(const FileFilter: string; Extensions: TStringList);</code></td>
</tr>
<tr><td colspan="1">
<p>
Extract file extensions from a file filter usually specified a TOpenDialog.Filter value.
<p>More precisely: expects FileFilter to be in the form of <code>'xxxx|name1.ext1;name2.ext2'</code>. Where "xxxx" is just about anything (it is ignored), and in fact whole "xxxx|" (with bar) may be omitted. The rest (after "|") is treated as a filename list, separated by semicolon ";".
<p>As Extensions contents, we set an array of all extensions extracted from these filenames. For example above, we would set Extensions to array with two items: <code>['.ext1', '.ext2']</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="GetFileFilterName"></a><code>function <b>GetFileFilterName</b>(const FileFilter: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Extract file filter name, from a file filter usually specified a TOpenDialog.Filter value.
<p>More precisely: if we do not see bar "|" character, then this is the filter name. Otherwise, everything on the right of "|" is "extensions" and everything on the left is "filter name".
<p>Additionally, if filter name ends with extensions value in parenthesis, they are removed. In other words, for 'Pascal files (*.pas)|*.pas', this will return just 'Pascal files'. The '(*.pas)' was removed from the filter name, because we detected this just repeats the extensions on the right of "|". Extensions on the right of "|" must be separated by semicolons, extensions within parenthesis on the left of "|" may be separated by semicolons ";" or colons ",".</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="GetFileFilterExtsStr"></a><code>function <b>GetFileFilterExtsStr</b>(const FileFilter: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Search in FileFilter for the bar character "|", and return everything after it. This is a simple basis for <a class="normal" href="CastleStringUtils.html#GetFileFilterExts">GetFileFilterExts</a>.
<p>If no "|" found, we return an empty string (in other words, file filter without "|" is treated as just a filter name, without any extensions).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SReplacePatterns"></a><code>function <b>SReplacePatterns</b>(const s: string; const patterns, values: array of string; const Options: <a href="CastleStringUtils.html#TSearchOptions">TSearchOptions</a>): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Replace all strings in Patterns with corresponding strings in Values. This is similar to standard StringReplace, but this does many replaces at once.
<p>Patterns and Values arrays must have equal length. Patterns[0] will be replaced with Values[0], Patterns[1] with Values[0] etc. Patterns are scanned from left to right, that is if two pattern occurrences overlap — we will detect the leftmost one. If both patterns start at the same place (this means that one pattern is a prefix of the other), we will choose the first pattern in Patterns table.
<p>Using this avoids a common trap at repeated search-replace operations. A naive implementation of doing many search-replace over the same string is like
<p></p>
<pre class="longcode">
Result := S;
Result := StringReplace(Result, Patterns[<span class="pascal_numeric">0</span>], Values[<span class="pascal_numeric">0</span>], [rfReplaceAll]);
Result := StringReplace(Result, Patterns[<span class="pascal_numeric">1</span>], Values[<span class="pascal_numeric">1</span>], [rfReplaceAll]);
etc.
</pre>
<p>
<p>But the above fails badly when inserting some Values[] creates an occurrence of Pattern checked later. For example, when Values[0] contains inside whole Patterns[1]. More exotic situations involve when some Values[] glues with previous string contents to make a pattern detected later. This means that you could replace the same content many times, which is usually not what you want.
<p>That's why you should instead use this function for such situations.
<p>Options cannot contain soBackwards flag.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SReplacePatterns"></a><code>function <b>SReplacePatterns</b>(const s: string; const patterns, values: TStrings; const Options: <a href="CastleStringUtils.html#TSearchOptions">TSearchOptions</a>): string;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SCharsCount"></a><code>function <b>SCharsCount</b>(const s: string; c: char): Cardinal; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SCharsCount"></a><code>function <b>SCharsCount</b>(const s: string; const Chars: <a href="CastleStringUtils.html#TSetOfChars">TSetOfChars</a>): Cardinal; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="STruncateHash"></a><code>function <b>STruncateHash</b>(const s: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Remove from the string S everything after the first hash "#" character. Removes also this very "#" character.
<p>If string doesn't contain hash character, it's simply returned.
<p>Useful for interpreting simple text files when you want to treat things after "#" like a comment.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SUnformattable"></a><code>function <b>SUnformattable</b>(const s: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Return the value to reproduce exactly string S by Format procedure. Saying simply, this doubles the "%" characters inside the string. The intention is to make such string that <code>Format(<code>SUnformattable</code>(S), []) = S</code>. In other words, "quote" any suspicious "%" characters in S for Format.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SAnsiCompare"></a><code>function <b>SAnsiCompare</b>(const s1, s2: string; IgnoreCase: boolean): Integer;</code></td>
</tr>
<tr><td colspan="1">
<p>
Compare strings, taking into account current locale. This simply does AnsiCompareStr or AnsiCompareText, depending on IgnoreCase.
<p>Returns value < 0 when S1 < S2, returns 0 when S1 = S2 and value > 0 when S1 > S2.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SAnsiSame"></a><code>function <b>SAnsiSame</b>(const s1, s2: string; IgnoreCase: boolean): boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
Check if strings are equal, taking into account current locale. Shortcut for <a class="normal" href="CastleStringUtils.html#SAnsiCompare">SAnsiCompare</a>(S1, S2) = 0</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SPercentReplace"></a><code>function <b>SPercentReplace</b>(const InitialFormat: string; const Replaces: array of <a href="CastleStringUtils.TPercentReplace.html">TPercentReplace</a>; out ReplacementsDone: Cardinal; ErrorOnUnknownPercentFormat: boolean = true; PercentChar: char ='%'; IgnoreCase: boolean = false): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
Searches for %x patterns and replaces them with specified strings. Something like a more generalized Format routine.
<p>More precisely: every two-char sequence that starts with PercentChar and then is followed by one of Replaces[I].c characters is replaced with appropriate Replaces[i].s. Moreover, a pair of two PercentChar characters is replaced with one PercentChar character.
<p><i>For example</i>, assume that Replaces contains two items: <code>(c: 'B'; s: '<bold>'), (c: 'b'; s: '</bold>')</code>. Then <code><a class="normal" href="CastleStringUtils.html#SPercentReplace">SPercentReplace</a>('100%% of cats are %Bcute%b', Replaces)</code> will return string <code>'100% of cats are <bold>cute</bold>'</code>.
<p><a class="normal" href="CastleStringUtils.EUnknownPercentFormat.html">EUnknownPercentFormat</a> is raised if we will see two-char sequence that starts with PercentChar and then is followed by character that is not any Replaces[i].c and is not PercentChar. Also, a single PercentChar at the end of the string is an error.
<p><i>For example</i>, assume that Replaces contains the same two items as previously. Following calls will result in <a class="normal" href="CastleStringUtils.EUnknownPercentFormat.html">EUnknownPercentFormat</a> being raised: <code><a class="normal" href="CastleStringUtils.html#SPercentReplace">SPercentReplace</a>('Unknown sequence %x', Replaces)</code>, <code><a class="normal" href="CastleStringUtils.html#SPercentReplace">SPercentReplace</a>('Unterminated sequence %', Replaces)</code>.
<p>If ErrorOnUnknownPercentFormat is <code>False</code>, then <a class="normal" href="CastleStringUtils.EUnknownPercentFormat.html">EUnknownPercentFormat</a> will not be raised. Instead, incorrect sequence (like %x or unterminated % in examples above) will simply be left in the string.
<p>Of course, replacing is done intelligently. Which means that e.g. sequence of four % characters will be correctly transformed into two % characters.
<p>Note that IgnoreCase is used to match characters for Replaces[I].c. IgnoreCase is not used when it comes to comparing with PercentChar character, i.e. even when PercentChar will be set to some letter, it will always be compared in case-sensitive manner, regardless of IgnoreCase value.
<p>It is undefined (meaning: don't do it) what happens if Replaces array contains more than once the same character C, or if any character C in Replaces array is equal to PercentChar.
<p>ReplacementsDone, if passed, will return how many replacements were done. Not counting "meaningless" replacements of pair of PercentChar to one PercentChar (that is, we count only actual replacements from Replaces array).
<p>
<p> Do not use. Use standard StrUtils.StringsReplace instead. This procedure has no place in a game engine...
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleStringUtils.EUnknownPercentFormat.html">EUnknownPercentFormat</a></dt>
<dd>In case of error in InitialFormat string, if ErrorOnUnknownPercentFormat is <code>True</code>.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SPercentReplace"></a><code>function <b>SPercentReplace</b>(const InitialFormat: string; const Replaces: array of <a href="CastleStringUtils.TPercentReplace.html">TPercentReplace</a>; ErrorOnUnknownPercentFormat: boolean = true; PercentChar: char ='%'; IgnoreCase: boolean = false): string; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FormatNameCounter"></a><code>function <b>FormatNameCounter</b>(const NamePattern: string; const Index: Integer; const AllowOldPercentSyntax: boolean; out ReplacementsDone: Cardinal): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Replace sequences <code>@counter(<padding>)</code> in the NamePattern with Index. Any sequence <code>@counter(<padding>)</code> is detected (where <padding> is any integer >= 0) and replaced with Index padded with zeros (to given <padding> length).
<p>If AllowOldPercentSyntax is <code>True</code> then we also allow older deprecated syntax: replace %d in the NamePattern with Index. This is used only if <code>@counter(<padding>)</code> was not found in NamePattern.
<p></p>
<ul class="paragraph_spacing">
<li><p>%d is replaced with Index.
<p>You can insert a non-negative number between % and d, to pad the counter with zeros to desired length. For example, with Counter = 2, %d is replaced with just "2", %2d is replaced with "02", %4d is replaced with "0002".</p></li>
<li><p>%% is replaced with single percent char %.</p></li>
<li><p>Everything else is just copied to resulting string. Not recognized %-patterns are also just copied. The main purpose of this is to specify filenames with optional placeholders, so unrecognized stuff should be gracefully ignored.</p></li>
</ul>
<p>
<p>The percent syntax was deprecated as it cannot be used with URLs. Inside URLs, percent character must always be encodede as <code>%25</code>. Sequence like <code>%4d</code> must mean letter "M" (ASCII 77, which is 4d in hexadecimal) inside URL. We could potentially allow syntax like <code>%25d</code> or <code>%254d</code> (4-digit counter), but that's just ugly, and compatibility had to be broken anyway (after Castle Game Engine 4.0.1, you have to fix URLs to image sequences anyway, as <code>%4d</code> must mean letter "M").
<p>See <a href="http://castle-engine.sourceforge.net/x3d_extensions.php#section_ext_movie_from_image_sequence">http://castle-engine.sourceforge.net/x3d_extensions.php#section_ext_movie_from_image_sequence</a> for an example when this is useful.
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FormatNameCounter"></a><code>function <b>FormatNameCounter</b>(const NamePattern: string; const Index: Integer; const AllowOldPercentSyntax: boolean): string;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="DigitAsChar"></a><code>function <b>DigitAsChar</b>(b: byte): char;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert digit (like number 0) to character (like '0'). Use only for arguments within 0..9 range.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="DigitAsByte"></a><code>function <b>DigitAsByte</b>(c: char): byte;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert digit character (like '0') to a number (like 0). Use only for characters in '0'...'9' range.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStrZPad"></a><code>function <b>IntToStrZPad</b>(n: integer; minLength: integer): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert integer to string, padding string with zeros if needed.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStrBase"></a><code>function <b>IntToStrBase</b>(const n: Int64; Base: Byte): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert integer to string, in base-Base (like base-16) numeral system. For digits above '9', we will use upper letters 'A', 'B'... etc. That's also why Base cannot be larger than 'Z'-'A' + 1 + 10 (we would not have enough digits then).
<p>Overloaded versions with MinLength pad result with zeros to have at least MinLength.
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStrBase"></a><code>function <b>IntToStrBase</b>( n: QWord; Base: Byte): string; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStrBase"></a><code>function <b>IntToStrBase</b>(const n: Int64; Base: Byte; minLength: Cardinal): string; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStrBase"></a><code>function <b>IntToStrBase</b>(const n: QWord; Base: Byte; minLength: Cardinal): string; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStr2"></a><code>function <b>IntToStr2</b>(n: Int64; const MinLength: Cardinal = 1; const ZeroDigit: char = '0'; const OneDigit: char = '1'; const MinusSign: char = '-'): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert integer to binary (base-2 numeral system). MinLength means to left-pad result with zeros if necessary.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStr16"></a><code>function <b>IntToStr16</b>(const n: Int64; const minLength: Cardinal = 1): string; overload;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert integer to hexadecimal (base-16 numeral system). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IntToStr16"></a><code>function <b>IntToStr16</b>(const n: QWord; const minLength: Cardinal = 1): string; overload;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="PointerToStr"></a><code>function <b>PointerToStr</b>(Ptr: Pointer): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns Ptr as 0xXXX... hexadecimal value. "0x" is not a Pascal standard for coding hex values, but it's so popular that users are more likely to "get" 0x notation.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="Str2ToInt"></a><code>function <b>Str2ToInt</b>(const s: string): integer;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert string representing binary number to an integer. String must contain only '0', '1' (digits) and start with an optional sign (+ or -). </p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><code>EConvertError</code></dt>
<dd>On problems with conversion.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="StrHexToInt"></a><code>function <b>StrHexToInt</b>(const s: string): Int64;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert string with hexadecimal number to an integer. String must contain only digits (0-9, a-z, A-Z), and with an optional sign (+ or -). </p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><code>EConvertError</code></dt>
<dd>On problems with conversion.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="StrToFloatDef"></a><code>function <b>StrToFloatDef</b>(const s: string; DefValue: Extended): Extended;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SetToStr"></a><code>function <b>SetToStr</b>(const SetVariable; NumStart, NumEnd: byte): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert a set to a string representation, in somewhat hacky way. This assumes that given SetVariable is a set value, and the set type is "set of [NumStart .. NumEnd]".
<p><i>Implementation is heavily dependent on how the sets are internally stored.</i> For now, we depend that a set of [NumStart .. NumEnd] behaves like a set of Byte, shifted to the left (i.e., NumStart corresponds to a 0 in set of Byte). This is not necessarily true ! For example in Delphi 5 (as far as I remember — I don't have this Delphi now, and I don't remember on which Delphi version I observed this) set of 1..16 uses first three bytes, and the first bit (that would correspond to 0) is simply wasted. In fact, SizeOf such set is still 4, which means that internally sets eat 4 bytes anyway. But SizeOf set 200..216 is also 4, which means that the compiler is smart and doesn't waste too much space to store only 17 bits.
<p>This all is not a rant on internal set handling by Delphi. On the contrary, Delphi does it for speed reasons, and that's very good. This is just a warning that <code>SetToStr</code> is not really reliable, and you may need to experiment a little with NumStart / NumEnd values to get sensible results. Although if your set is like "set of [0 ... something]", this should usually work OK,
<p>Still: <i>this function should be used only for debug purposes. Don't depend on it working 100% correctly always — it can't, because we can't depend on how compiler stores sets.</i></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="PCharOrNil"></a><code>function <b>PCharOrNil</b>(const s: string): PChar;</code></td>
</tr>
<tr><td colspan="1">
<p>
<code>PCharOrNil</code> simply returns a Pointer(S), you can think of it as a NO-OP. If string is empty, this returns <code>Nil</code>, otherwise it works just like PChar(S): returns a Pointer(S) with appropriate type cast.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SCompressWhiteSpace"></a><code>function <b>SCompressWhiteSpace</b>(const S: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Replace any number of consecutive whitespace (including newlines) with a single whitespace. This is nice when you have a string (possibly multiline) supplied by user, and you want to use this for some UI item (like window's caption or menu item) — this "sanitizes" whitespace inside such string.</p>
</td></tr>
</table>
<h3 class="detail">Types</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TDynamicStringArray"></a><code><b>TDynamicStringArray</b> = array of string;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TSearchOptions"></a><code><b>TSearchOptions</b> = set of (soMatchCase, soWholeWord, soBackwards);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="TSetOfChars"></a><code><b>TSetOfChars</b> = SysUtils.TSysCharSet;</code></td>
</tr>
<tr><td colspan="1">
<p>
A set of chars.</p>
</td></tr>
</table>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="AllChars"></a><code><b>AllChars</b> = [Low(Char) .. High(Char)];</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="DefaultWordBorders"></a><code><b>DefaultWordBorders</b> = <a href="CastleStringUtils.html#AllChars">AllChars</a> - ['a'..'z', 'A'..'Z', '0'..'9', '_'];</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="WhiteSpaces"></a><code><b>WhiteSpaces</b> = [' ', #9, #10, #13];</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SimpleAsciiCharacters"></a><code><b>SimpleAsciiCharacters</b> = [#32 .. #126];</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="BoolToStr"></a><code><b>BoolToStr</b>: array[boolean] of string=('FALSE','TRUE');</code></td>
</tr>
<tr><td colspan="1">
<p>
Convert boolean to string, using a simple table lookup.
<p>I don't use <code>BoolToStr</code> function from SysUtils unit, since there are differences in FPC implementations: </p>
<ul class="paragraph_spacing">
<li><p>In FPC <= 2.0.4, <code>BoolToStr</code> takes one param and returns 'FALSE' or 'TRUE' string.</p></li>
<li><p>In FPC > 2.0.4 (trunk (2.3.1 currently), and fixes_2_2 (2,1.3)), <code>BoolToStr</code> was changed for Delphi compat. Now when passed only 1 param it returns 0 or -1 (who the hell needs such <code>BoolToStr</code> interpretation ?).
<p>You have to pass 2nd param to <code>BoolToStr</code> as <code>True</code> to get strings 'False' and 'True'. But this makes it non-compileable in FPC <= 2.0.4. So to call <code>BoolToStr</code> like I want to, I would have to use ugly $ifdefs...</p></li>
</ul>
<p>
<p>So I decided to use my <code>BoolToStr</code> table throughout my units. When I'll switch fully to FPC > 2.0.4, I'll drop this and use <code>BoolToStr</code> function from SysUtils unit.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="BoolToStrYesNo"></a><code><b>BoolToStrYesNo</b>: array[boolean]of string = ('No','Yes');</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlA"></a><code><b>CtrlA</b> = Chr(Ord('a') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlB"></a><code><b>CtrlB</b> = Chr(Ord('b') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlC"></a><code><b>CtrlC</b> = Chr(Ord('c') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlD"></a><code><b>CtrlD</b> = Chr(Ord('d') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlE"></a><code><b>CtrlE</b> = Chr(Ord('e') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlF"></a><code><b>CtrlF</b> = Chr(Ord('f') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlG"></a><code><b>CtrlG</b> = Chr(Ord('g') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlH"></a><code><b>CtrlH</b> = Chr(Ord('h') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlI"></a><code><b>CtrlI</b> = Chr(Ord('i') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlJ"></a><code><b>CtrlJ</b> = Chr(Ord('j') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlK"></a><code><b>CtrlK</b> = Chr(Ord('k') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlL"></a><code><b>CtrlL</b> = Chr(Ord('l') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlM"></a><code><b>CtrlM</b> = Chr(Ord('m') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlN"></a><code><b>CtrlN</b> = Chr(Ord('n') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlO"></a><code><b>CtrlO</b> = Chr(Ord('o') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlP"></a><code><b>CtrlP</b> = Chr(Ord('p') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlQ"></a><code><b>CtrlQ</b> = Chr(Ord('q') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlR"></a><code><b>CtrlR</b> = Chr(Ord('r') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlS"></a><code><b>CtrlS</b> = Chr(Ord('s') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlT"></a><code><b>CtrlT</b> = Chr(Ord('t') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlU"></a><code><b>CtrlU</b> = Chr(Ord('u') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlV"></a><code><b>CtrlV</b> = Chr(Ord('v') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlW"></a><code><b>CtrlW</b> = Chr(Ord('w') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlX"></a><code><b>CtrlX</b> = Chr(Ord('x') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlY"></a><code><b>CtrlY</b> = Chr(Ord('y') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CtrlZ"></a><code><b>CtrlZ</b> = Chr(Ord('z') - Ord('a') + 1);</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharBackSpace"></a><code><b>CharBackSpace</b> = #8;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharTab"></a><code><b>CharTab</b> = #9;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharEnter"></a><code><b>CharEnter</b> = #13;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharEscape"></a><code><b>CharEscape</b> = #27;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CharDelete"></a><code><b>CharDelete</b> = #127;</code></td>
</tr>
<tr><td colspan="1">
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:12</em>
</span>
</td></tr></table></body></html>
|