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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>C Standard Library Extensions: Strings</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">C Standard Library Extensions
 <span id="projectnumber">1.2.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Strings</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga48dfca37e3a62f7fe98edc3f38c0faeb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga48dfca37e3a62f7fe98edc3f38c0faeb"></a>
typedef struct _cx_string_ </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a></td></tr>
<tr class="memdesc:ga48dfca37e3a62f7fe98edc3f38c0faeb"><td class="mdescLeft"> </td><td class="mdescRight">The cx_string data type. <br /></td></tr>
<tr class="separator:ga48dfca37e3a62f7fe98edc3f38c0faeb"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2677bfd02e0324dcaf6a16146cc5d613"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga2677bfd02e0324dcaf6a16146cc5d613">cx_string_new</a> (void)</td></tr>
<tr class="memdesc:ga2677bfd02e0324dcaf6a16146cc5d613"><td class="mdescLeft"> </td><td class="mdescRight">Create a new, empty string container. <a href="#ga2677bfd02e0324dcaf6a16146cc5d613">More...</a><br /></td></tr>
<tr class="separator:ga2677bfd02e0324dcaf6a16146cc5d613"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga173e094b6b10810d3b9b0891012d50a4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga173e094b6b10810d3b9b0891012d50a4">cx_string_copy</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:ga173e094b6b10810d3b9b0891012d50a4"><td class="mdescLeft"> </td><td class="mdescRight">Create a copy a cx_string. <a href="#ga173e094b6b10810d3b9b0891012d50a4">More...</a><br /></td></tr>
<tr class="separator:ga173e094b6b10810d3b9b0891012d50a4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae21504ed4cde96fd5233167f09d90872"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gae21504ed4cde96fd5233167f09d90872">cx_string_create</a> (const cxchar *value)</td></tr>
<tr class="memdesc:gae21504ed4cde96fd5233167f09d90872"><td class="mdescLeft"> </td><td class="mdescRight">Create a new string from a standard C string. <a href="#gae21504ed4cde96fd5233167f09d90872">More...</a><br /></td></tr>
<tr class="separator:gae21504ed4cde96fd5233167f09d90872"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7c9522f40844cecd8aa31a537d594a73"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga7c9522f40844cecd8aa31a537d594a73">cx_string_delete</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:ga7c9522f40844cecd8aa31a537d594a73"><td class="mdescLeft"> </td><td class="mdescRight">Destroy a string. <a href="#ga7c9522f40844cecd8aa31a537d594a73">More...</a><br /></td></tr>
<tr class="separator:ga7c9522f40844cecd8aa31a537d594a73"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad62f3f0eaf0a991913c826d2fb36c8c2"><td class="memItemLeft" align="right" valign="top">cxsize </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gad62f3f0eaf0a991913c826d2fb36c8c2">cx_string_size</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:gad62f3f0eaf0a991913c826d2fb36c8c2"><td class="mdescLeft"> </td><td class="mdescRight">Computes the length of the string. <a href="#gad62f3f0eaf0a991913c826d2fb36c8c2">More...</a><br /></td></tr>
<tr class="separator:gad62f3f0eaf0a991913c826d2fb36c8c2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab302e36ebde49a78e387bda399762faa"><td class="memItemLeft" align="right" valign="top">cxbool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gab302e36ebde49a78e387bda399762faa">cx_string_empty</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:gab302e36ebde49a78e387bda399762faa"><td class="mdescLeft"> </td><td class="mdescRight">Checks whether a string contains any characters. <a href="#gab302e36ebde49a78e387bda399762faa">More...</a><br /></td></tr>
<tr class="separator:gab302e36ebde49a78e387bda399762faa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga745c3e5f86abb0e9e64c3a4fa785c1de"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga745c3e5f86abb0e9e64c3a4fa785c1de">cx_string_set</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, const cxchar *data)</td></tr>
<tr class="memdesc:ga745c3e5f86abb0e9e64c3a4fa785c1de"><td class="mdescLeft"> </td><td class="mdescRight">Assign a value to a string. <a href="#ga745c3e5f86abb0e9e64c3a4fa785c1de">More...</a><br /></td></tr>
<tr class="separator:ga745c3e5f86abb0e9e64c3a4fa785c1de"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga90d4fbf5e229be5dcbd05a83c4fa547a"><td class="memItemLeft" align="right" valign="top">const cxchar * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga90d4fbf5e229be5dcbd05a83c4fa547a">cx_string_get</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:ga90d4fbf5e229be5dcbd05a83c4fa547a"><td class="mdescLeft"> </td><td class="mdescRight">Get the string's value. <a href="#ga90d4fbf5e229be5dcbd05a83c4fa547a">More...</a><br /></td></tr>
<tr class="separator:ga90d4fbf5e229be5dcbd05a83c4fa547a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8c8b03637f4a99432f40b200bcd9bd0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga8c8b03637f4a99432f40b200bcd9bd0a">cx_string_upper</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:ga8c8b03637f4a99432f40b200bcd9bd0a"><td class="mdescLeft"> </td><td class="mdescRight">Converts the string into uppercase. <a href="#ga8c8b03637f4a99432f40b200bcd9bd0a">More...</a><br /></td></tr>
<tr class="separator:ga8c8b03637f4a99432f40b200bcd9bd0a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad99ff4d8cec308e5b7319f969f0330c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gad99ff4d8cec308e5b7319f969f0330c0">cx_string_lower</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:gad99ff4d8cec308e5b7319f969f0330c0"><td class="mdescLeft"> </td><td class="mdescRight">Converts the string into lowercase. <a href="#gad99ff4d8cec308e5b7319f969f0330c0">More...</a><br /></td></tr>
<tr class="separator:gad99ff4d8cec308e5b7319f969f0330c0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad38326b29c82dcdc93bfb3252f3c9f49"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gad38326b29c82dcdc93bfb3252f3c9f49">cx_string_trim</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:gad38326b29c82dcdc93bfb3252f3c9f49"><td class="mdescLeft"> </td><td class="mdescRight">Remove leading whitespaces from the string. <a href="#gad38326b29c82dcdc93bfb3252f3c9f49">More...</a><br /></td></tr>
<tr class="separator:gad38326b29c82dcdc93bfb3252f3c9f49"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae7a22caf2e7286730e882170cf4a6fe3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gae7a22caf2e7286730e882170cf4a6fe3">cx_string_rtrim</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:gae7a22caf2e7286730e882170cf4a6fe3"><td class="mdescLeft"> </td><td class="mdescRight">Remove trailing whitespaces from the string. <a href="#gae7a22caf2e7286730e882170cf4a6fe3">More...</a><br /></td></tr>
<tr class="separator:gae7a22caf2e7286730e882170cf4a6fe3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad1c1ed2a92a736ed8900101cdfbd3ce7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gad1c1ed2a92a736ed8900101cdfbd3ce7">cx_string_strip</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self)</td></tr>
<tr class="memdesc:gad1c1ed2a92a736ed8900101cdfbd3ce7"><td class="mdescLeft"> </td><td class="mdescRight">Remove leading and trailing whitespaces from the string. <a href="#gad1c1ed2a92a736ed8900101cdfbd3ce7">More...</a><br /></td></tr>
<tr class="separator:gad1c1ed2a92a736ed8900101cdfbd3ce7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5255beabea7b5da62d4d2bf7bf6a27ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga5255beabea7b5da62d4d2bf7bf6a27ad">cx_string_prepend</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, const cxchar *data)</td></tr>
<tr class="memdesc:ga5255beabea7b5da62d4d2bf7bf6a27ad"><td class="mdescLeft"> </td><td class="mdescRight">Prepend an array of characters to the string. <a href="#ga5255beabea7b5da62d4d2bf7bf6a27ad">More...</a><br /></td></tr>
<tr class="separator:ga5255beabea7b5da62d4d2bf7bf6a27ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5488378ca5476e1402fa9ac880c5c2e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga5488378ca5476e1402fa9ac880c5c2e6">cx_string_append</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, const cxchar *data)</td></tr>
<tr class="memdesc:ga5488378ca5476e1402fa9ac880c5c2e6"><td class="mdescLeft"> </td><td class="mdescRight">Append an array of characters to the string. <a href="#ga5488378ca5476e1402fa9ac880c5c2e6">More...</a><br /></td></tr>
<tr class="separator:ga5488378ca5476e1402fa9ac880c5c2e6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa9916cdc9590244f118ee8d82d88f576"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gaa9916cdc9590244f118ee8d82d88f576">cx_string_insert</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, cxssize position, const cxchar *data)</td></tr>
<tr class="memdesc:gaa9916cdc9590244f118ee8d82d88f576"><td class="mdescLeft"> </td><td class="mdescRight">Inserts a copy of a string at a given position. <a href="#gaa9916cdc9590244f118ee8d82d88f576">More...</a><br /></td></tr>
<tr class="separator:gaa9916cdc9590244f118ee8d82d88f576"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac36b30ef4a5fa1036a333964db2ddbd0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gac36b30ef4a5fa1036a333964db2ddbd0">cx_string_erase</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, cxssize position, cxssize length)</td></tr>
<tr class="memdesc:gac36b30ef4a5fa1036a333964db2ddbd0"><td class="mdescLeft"> </td><td class="mdescRight">Erase a portion of the string. <a href="#gac36b30ef4a5fa1036a333964db2ddbd0">More...</a><br /></td></tr>
<tr class="separator:gac36b30ef4a5fa1036a333964db2ddbd0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga871347bfc5e8a5beacf9864b250e0fc0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga871347bfc5e8a5beacf9864b250e0fc0">cx_string_truncate</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, cxsize length)</td></tr>
<tr class="memdesc:ga871347bfc5e8a5beacf9864b250e0fc0"><td class="mdescLeft"> </td><td class="mdescRight">Truncate the string. <a href="#ga871347bfc5e8a5beacf9864b250e0fc0">More...</a><br /></td></tr>
<tr class="separator:ga871347bfc5e8a5beacf9864b250e0fc0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gabfb7b87860630a2170ca42f81fdca313"><td class="memItemLeft" align="right" valign="top">cxbool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gabfb7b87860630a2170ca42f81fdca313">cx_string_equal</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string1, const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string2)</td></tr>
<tr class="memdesc:gabfb7b87860630a2170ca42f81fdca313"><td class="mdescLeft"> </td><td class="mdescRight">Compare two cx_string for equality. <a href="#gabfb7b87860630a2170ca42f81fdca313">More...</a><br /></td></tr>
<tr class="separator:gabfb7b87860630a2170ca42f81fdca313"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga369142333463cf53a883641d6188add9"><td class="memItemLeft" align="right" valign="top">cxint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga369142333463cf53a883641d6188add9">cx_string_compare</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string1, const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string2)</td></tr>
<tr class="memdesc:ga369142333463cf53a883641d6188add9"><td class="mdescLeft"> </td><td class="mdescRight">Compare two strings. <a href="#ga369142333463cf53a883641d6188add9">More...</a><br /></td></tr>
<tr class="separator:ga369142333463cf53a883641d6188add9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf1405a4f49042e53c06380f32875f901"><td class="memItemLeft" align="right" valign="top">cxint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gaf1405a4f49042e53c06380f32875f901">cx_string_casecmp</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string1, const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string2)</td></tr>
<tr class="memdesc:gaf1405a4f49042e53c06380f32875f901"><td class="mdescLeft"> </td><td class="mdescRight">Compare two strings ignoring the case of characters. <a href="#gaf1405a4f49042e53c06380f32875f901">More...</a><br /></td></tr>
<tr class="separator:gaf1405a4f49042e53c06380f32875f901"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf0c12330806814bce631fdc121c8283b"><td class="memItemLeft" align="right" valign="top">cxint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gaf0c12330806814bce631fdc121c8283b">cx_string_ncasecmp</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string1, const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string2, cxsize n)</td></tr>
<tr class="memdesc:gaf0c12330806814bce631fdc121c8283b"><td class="mdescLeft"> </td><td class="mdescRight">Compare the first n characters of two strings ignoring the case of characters. <a href="#gaf0c12330806814bce631fdc121c8283b">More...</a><br /></td></tr>
<tr class="separator:gaf0c12330806814bce631fdc121c8283b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga29362244440619a3d7090259c7549585"><td class="memItemLeft" align="right" valign="top">cxint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga29362244440619a3d7090259c7549585">cx_string_sprintf</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, const char *format,...)</td></tr>
<tr class="memdesc:ga29362244440619a3d7090259c7549585"><td class="mdescLeft"> </td><td class="mdescRight">Writes to a string under format control. <a href="#ga29362244440619a3d7090259c7549585">More...</a><br /></td></tr>
<tr class="separator:ga29362244440619a3d7090259c7549585"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga27c9339137a6f0b90cb93cb0bbd1c476"><td class="memItemLeft" align="right" valign="top">cxint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga27c9339137a6f0b90cb93cb0bbd1c476">cx_string_vsprintf</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, const cxchar *format, va_list args)</td></tr>
<tr class="memdesc:ga27c9339137a6f0b90cb93cb0bbd1c476"><td class="mdescLeft"> </td><td class="mdescRight">Write to the string from a variable-length argument list under format control. <a href="#ga27c9339137a6f0b90cb93cb0bbd1c476">More...</a><br /></td></tr>
<tr class="separator:ga27c9339137a6f0b90cb93cb0bbd1c476"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac7f190519bb7e5497c088cf8a60f2856"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gac7f190519bb7e5497c088cf8a60f2856">cx_string_print</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *string)</td></tr>
<tr class="memdesc:gac7f190519bb7e5497c088cf8a60f2856"><td class="mdescLeft"> </td><td class="mdescRight">Print the value of a cx_string to the standard output. <a href="#gac7f190519bb7e5497c088cf8a60f2856">More...</a><br /></td></tr>
<tr class="separator:gac7f190519bb7e5497c088cf8a60f2856"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2f129f15130f4e8e06c82c44a58d0663"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga2f129f15130f4e8e06c82c44a58d0663">cx_string_replace_character</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, cxsize start, cxsize end, cxchar old_value, cxchar new_value)</td></tr>
<tr class="memdesc:ga2f129f15130f4e8e06c82c44a58d0663"><td class="mdescLeft"> </td><td class="mdescRight">Replace a given character with a new character in a portion of a string. <a href="#ga2f129f15130f4e8e06c82c44a58d0663">More...</a><br /></td></tr>
<tr class="separator:ga2f129f15130f4e8e06c82c44a58d0663"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga379950ddc09f3785959e5765b3d91223"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga379950ddc09f3785959e5765b3d91223">cx_string_resize</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, cxsize size, cxchar c)</td></tr>
<tr class="memdesc:ga379950ddc09f3785959e5765b3d91223"><td class="mdescLeft"> </td><td class="mdescRight">Resize a string to a given length. <a href="#ga379950ddc09f3785959e5765b3d91223">More...</a><br /></td></tr>
<tr class="separator:ga379950ddc09f3785959e5765b3d91223"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae73fda53dad0d22b93eb0b21bdb30ef8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gae73fda53dad0d22b93eb0b21bdb30ef8">cx_string_extend</a> (<a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, cxsize size, cxchar c)</td></tr>
<tr class="memdesc:gae73fda53dad0d22b93eb0b21bdb30ef8"><td class="mdescLeft"> </td><td class="mdescRight">Extend a string to a given length. <a href="#gae73fda53dad0d22b93eb0b21bdb30ef8">More...</a><br /></td></tr>
<tr class="separator:gae73fda53dad0d22b93eb0b21bdb30ef8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad945ea3ce10ac659d45564ee9da3927e"><td class="memItemLeft" align="right" valign="top">cxsize </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gad945ea3ce10ac659d45564ee9da3927e">cx_string_find_first_not_of</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, const cxchar *characters)</td></tr>
<tr class="memdesc:gad945ea3ce10ac659d45564ee9da3927e"><td class="mdescLeft"> </td><td class="mdescRight">Search a string for the first character that does not match any of the given characters. <a href="#gad945ea3ce10ac659d45564ee9da3927e">More...</a><br /></td></tr>
<tr class="separator:gad945ea3ce10ac659d45564ee9da3927e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4ae5e670c5c4942c41061865427d0317"><td class="memItemLeft" align="right" valign="top">cxsize </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#ga4ae5e670c5c4942c41061865427d0317">cx_string_find_last_not_of</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, const cxchar *characters)</td></tr>
<tr class="memdesc:ga4ae5e670c5c4942c41061865427d0317"><td class="mdescLeft"> </td><td class="mdescRight">Search a string for the last character that does not match any of the given characters. <a href="#ga4ae5e670c5c4942c41061865427d0317">More...</a><br /></td></tr>
<tr class="separator:ga4ae5e670c5c4942c41061865427d0317"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad1c9f69afcebd0ef57d3e5a79fa221ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxstring.html#gad1c9f69afcebd0ef57d3e5a79fa221ac">cx_string_substr</a> (const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *self, cxsize pos, cxsize len)</td></tr>
<tr class="memdesc:gad1c9f69afcebd0ef57d3e5a79fa221ac"><td class="mdescLeft"> </td><td class="mdescRight">Create a new string from a portion of a string. <a href="#gad1c9f69afcebd0ef57d3e5a79fa221ac">More...</a><br /></td></tr>
<tr class="separator:gad1c9f69afcebd0ef57d3e5a79fa221ac"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A <b>cx_string</b> is similar to a standard C string, except that it grows automatically as text is appended or inserted. The character data the string contains is '\0' terminated in order to guarantee full compatibility with string utility functions processing standard C strings. Together with the character data it also stores the length of the string. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga5488378ca5476e1402fa9ac880c5c2e6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_append </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Append an array of characters to the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string. </td></tr>
<tr><td class="paramname">data</td><td>Pointer to character array to be appended.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with the characters appended, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function adds the contents of the character buffer <em>data</em> to the end of the string. If <em>data</em> is a <code>NULL</code> pointer the string <em>self</em> is not modified. </p>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>.</p>
<p>Referenced by <a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler()</a>.</p>
</div>
</div>
<a class="anchor" id="gaf1405a4f49042e53c06380f32875f901"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxint cx_string_casecmp </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compare two strings ignoring the case of characters. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string1</td><td>First cx_string. </td></tr>
<tr><td class="paramname">string2</td><td>Second cx_string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns an interger less than, equal to, or greater than <code>0</code> if <em>string1</em> is found, respectively, to be less than, to match, or to be greater than <em>string2</em>.</dd></dl>
<p>The function compares <em>string2</em> with <em>string</em> in the same way as the standard C function <b>strcmp()</b> does, but ignores the case of ASCII characters. </p>
<p>References <a class="el" href="group__cxstrutils.html#ga371fe36ad7806cbb499dca1ec8607ef2">cx_strcasecmp()</a>.</p>
</div>
</div>
<a class="anchor" id="ga369142333463cf53a883641d6188add9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxint cx_string_compare </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compare two strings. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string1</td><td>First cx_string. </td></tr>
<tr><td class="paramname">string2</td><td>Second cx_string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns an interger less than, equal to, or greater than <code>0</code> if <em>string1</em> is found, respectively, to be less than, to match, or to be greater than <em>string2</em>.</dd></dl>
<p>The function compares <em>string2</em> with <em>string</em> in the same way as the standard C function <b>strcmp()</b> does. </p>
</div>
</div>
<a class="anchor" id="ga173e094b6b10810d3b9b0891012d50a4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_copy </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a copy a cx_string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string to copy.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the newly created copy of <em>string</em>. </dd></dl>
</div>
</div>
<a class="anchor" id="gae21504ed4cde96fd5233167f09d90872"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_create </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new string from a standard C string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">value</td><td>The initial text to copy into the string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly created string.</dd></dl>
<p>A new string is created and the text <em>value</em> is initially copied into the string. </p>
<p>Referenced by <a class="el" href="group__cxstring.html#gad1c9f69afcebd0ef57d3e5a79fa221ac">cx_string_substr()</a>.</p>
</div>
</div>
<a class="anchor" id="ga7c9522f40844cecd8aa31a537d594a73"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cx_string_delete </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string to destroy.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>The function deallocates <em>string's</em> character buffer and finally frees the memory allocated for <em>string</em> itself. </p>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>.</p>
<p>Referenced by <a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler()</a>.</p>
</div>
</div>
<a class="anchor" id="gab302e36ebde49a78e387bda399762faa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxbool cx_string_empty </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether a string contains any characters. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns TRUE if the string is empty, or FALSE otherwise.</dd></dl>
<p>A string is considered to be empty if its size is 0 or if it has not been initialized, i.e. no value has been assigned yet. </p>
</div>
</div>
<a class="anchor" id="gabfb7b87860630a2170ca42f81fdca313"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxbool cx_string_equal </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compare two cx_string for equality. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string1</td><td>First cx_string. </td></tr>
<tr><td class="paramname">string2</td><td>Second cx_string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if equal, FALSE if not.</dd></dl>
<p>The function checks whether two strings are equal. Two strings are equal if their values match on a character by character basis. </p>
</div>
</div>
<a class="anchor" id="gac36b30ef4a5fa1036a333964db2ddbd0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_erase </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxssize </td>
<td class="paramname"><em>position</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxssize </td>
<td class="paramname"><em>length</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Erase a portion of the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string. </td></tr>
<tr><td class="paramname">position</td><td>Position of the first character to be erased. </td></tr>
<tr><td class="paramname">length</td><td>Number of characters to erase.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with the characters removed, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function removes <em>length</em> characters from the string starting at the character index <em>position</em>. The number of characters to be removed is inclusive the character at index <em>position</em>. The characters following the removed portion are shifted to fill the gap. Character positions start counting from 0.</p>
<p>If the number of characters to erase <em>length</em> is less the <code>0</code> all characters starting at <em>position</em> up to the end of the string are erased. </p>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>.</p>
</div>
</div>
<a class="anchor" id="gae73fda53dad0d22b93eb0b21bdb30ef8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cx_string_extend </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxchar </td>
<td class="paramname"><em>c</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Extend a string to a given length. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>A cx_string. </td></tr>
<tr><td class="paramname">size</td><td>The number of characters by which the string is enlarged. </td></tr>
<tr><td class="paramname">c</td><td>The character used to fill the new character space</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>The function extends a string by adding to its end <em>size</em> number of of characters. The added characters are initialized with the character <em>c</em>.</p>
<p>Extending a string with zero characters leaves the string untouched.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cxstring.html#ga379950ddc09f3785959e5765b3d91223" title="Resize a string to a given length. ">cx_string_resize()</a> </dd></dl>
<p>References <a class="el" href="group__cxmemory.html#gad6e24975b7161a4d3f5fe49fd84df740">cx_calloc()</a>, and <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>.</p>
</div>
</div>
<a class="anchor" id="gad945ea3ce10ac659d45564ee9da3927e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxsize cx_string_find_first_not_of </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>characters</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Search a string for the first character that does not match any of the given characters. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>A string. </td></tr>
<tr><td class="paramname">characters</td><td>Another string with a set of characters to be used in the search of the string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns the position of the first character that does not match, or the position one past the last element of the string(i.e. the current size of the string) if no such character exists.</dd></dl>
<p>The function searches the given string for the first character that does not match any of the characters specified in the set of characters <em>characters</em>. </p>
</div>
</div>
<a class="anchor" id="ga4ae5e670c5c4942c41061865427d0317"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxsize cx_string_find_last_not_of </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>characters</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Search a string for the last character that does not match any of the given characters. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>A string. </td></tr>
<tr><td class="paramname">characters</td><td>Another string with a set of characters to be used in the search of the string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns the position of the last character that does not match, or the position one past the last element of the string(i.e. the current size of the string) if no such character exists.</dd></dl>
<p>The function searches the given string for the last character that does not match any of the characters specified in the set of characters <em>characters</em>. </p>
</div>
</div>
<a class="anchor" id="ga90d4fbf5e229be5dcbd05a83c4fa547a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cxchar* cx_string_get </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the string's value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A constant pointer to the string's <em>data</em> member, or <code>NULL</code> if the string is uninitialized.</dd></dl>
<p>A pointer to the strings character data. The character array pointed to by this pointer is an standard C string, i.e. '\0' terminated and can be used together with any string processing function from the standard C library (but see below).</p>
<dl class="section warning"><dt>Warning</dt><dd>The string's data <b>must</b> <b>not</b> be modified using the returned pointer, otherwise the internal consistency may be lost. </dd></dl>
<p>Referenced by <a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa9916cdc9590244f118ee8d82d88f576"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxssize </td>
<td class="paramname"><em>position</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Inserts a copy of a string at a given position. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string. </td></tr>
<tr><td class="paramname">position</td><td>Character position at which the data is inserted. </td></tr>
<tr><td class="paramname">data</td><td>Pointer to character array to be inserted.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with the characters inserted, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function inserts the contents of the character buffer <em>data</em> at the character index <em>position</em> into the string, expanding the string if necessary. Character positions start counting from 0. If <em>data</em> is a <code>NULL</code> pointer the string <em>self</em> is not modified. </p>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>.</p>
</div>
</div>
<a class="anchor" id="gad99ff4d8cec308e5b7319f969f0330c0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_lower </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Converts the string into lowercase. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with all characters converted to lowercase, or <code>NULL</code> in case of errors.</dd></dl>
<p>All uppercase letters stored in the string are converted to lowercase letters. The conversion is done using the standard C function <b>tolower()</b>. </p>
</div>
</div>
<a class="anchor" id="gaf0c12330806814bce631fdc121c8283b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxint cx_string_ncasecmp </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>n</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compare the first n characters of two strings ignoring the case of characters. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string1</td><td>First string. </td></tr>
<tr><td class="paramname">string2</td><td>Second string. </td></tr>
<tr><td class="paramname">n</td><td>Number of characters to compare.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer less than, equal to, or greater than zero if the first <em>n</em> characters of <em>string1</em> are found, respectively, to be less than, to match, or be greater than the first <em>n</em> characters of <em>string2</em>.</dd></dl>
<p>The function compares the first <em>n</em> characters of the two strings <em>string1</em> and <em>string2</em> as <b>strncmp()</b> does, but ignores the case of ASCII characters. </p>
<p>References <a class="el" href="group__cxstrutils.html#ga1c9ec225c00d0517c4a8ba2f4668cc08">cx_strncasecmp()</a>.</p>
</div>
</div>
<a class="anchor" id="ga2677bfd02e0324dcaf6a16146cc5d613"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_new </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new, empty string container. </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly created string.</dd></dl>
<p>The function allocates memory for a new string object and initializes it to represent the empty string.</p>
<p>Using this constructor is the <b>only</b> way to correctly create and setup a new string. </p>
<p>Referenced by <a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler()</a>, and <a class="el" href="group__cxstring.html#gad1c9f69afcebd0ef57d3e5a79fa221ac">cx_string_substr()</a>.</p>
</div>
</div>
<a class="anchor" id="ga5255beabea7b5da62d4d2bf7bf6a27ad"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_prepend </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Prepend an array of characters to the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string. </td></tr>
<tr><td class="paramname">data</td><td>Pointer to character array to be prepended.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with the characters prepended, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function adds the contents of the character buffer <em>data</em> to the beginning of the string. If <em>data</em> is a <code>NULL</code> pointer the string <em>self</em> is not modified. </p>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>.</p>
<p>Referenced by <a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler()</a>.</p>
</div>
</div>
<a class="anchor" id="gac7f190519bb7e5497c088cf8a60f2856"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cx_string_print </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Print the value of a cx_string to the standard output. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>A cx_string.</td></tr>
</table>
</dd>
</dl>
<p>This function is provided for debugging purposes. It just writes the strings contents to the standard output using <b><a class="el" href="group__cxmessages.html#ga61bf6d7fbd22c7eaabc33028aae024f7" title="Output a formatted message via the print handler. ">cx_print()</a></b>. </p>
<p>References <a class="el" href="group__cxmessages.html#ga61bf6d7fbd22c7eaabc33028aae024f7">cx_print()</a>.</p>
</div>
</div>
<a class="anchor" id="ga2f129f15130f4e8e06c82c44a58d0663"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cx_string_replace_character </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>end</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxchar </td>
<td class="paramname"><em>old_value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxchar </td>
<td class="paramname"><em>new_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Replace a given character with a new character in a portion of a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>A cx_string. </td></tr>
<tr><td class="paramname">start</td><td>The initial position of the range. </td></tr>
<tr><td class="paramname">end</td><td>The final position of the range. </td></tr>
<tr><td class="paramname">old_value</td><td>The character to be replaced. </td></tr>
<tr><td class="paramname">new_value</td><td>The character used as replacement.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>The function replaces the all occurrences of the character <em>old_value</em> with the character <em>new_value</em> in the given range. The range of characters considered is given by the initial position <em>start</em> and the final position <em>end</em>, and does not include the final position, i.e. the range of characters is defined as [start, end).</p>
<p>If <em>start</em> is larger than the size of the string <em>string</em>, the function does nothing. </p>
</div>
</div>
<a class="anchor" id="ga379950ddc09f3785959e5765b3d91223"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cx_string_resize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxchar </td>
<td class="paramname"><em>c</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resize a string to a given length. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>A cx_string. </td></tr>
<tr><td class="paramname">size</td><td>The new length of the string. </td></tr>
<tr><td class="paramname">c</td><td>The character used to fill the new character space</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>The function resizes a string to a new length <em>size</em>. If the new length is smaller than the current length of the string, the string is shortened to its first <em>size</em> characters. If <em>size</em> is larger than the current length of the string its current contents is extended by adding to its end as many characters as needed to reach a length of <em>size</em> characters. In this latter case the added characters are initialized with the character <em>c</em>.</p>
<p>Specifying zero as the new length of the string, results in the empty string.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cxstring.html#ga871347bfc5e8a5beacf9864b250e0fc0" title="Truncate the string. ">cx_string_truncate()</a>, <a class="el" href="group__cxstring.html#gae73fda53dad0d22b93eb0b21bdb30ef8" title="Extend a string to a given length. ">cx_string_extend()</a> </dd></dl>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>.</p>
</div>
</div>
<a class="anchor" id="gae7a22caf2e7286730e882170cf4a6fe3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_rtrim </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove trailing whitespaces from the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with trailing whitespaces revoved, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function removes trailing whitespace characters from the string. Whitespace characters are recognized by the standard C function <b>isspace()</b>. </p>
</div>
</div>
<a class="anchor" id="ga745c3e5f86abb0e9e64c3a4fa785c1de"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cx_string_set </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assign a value to a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string. </td></tr>
<tr><td class="paramname">data</td><td>Character array to be assigned.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<p>Stores the contents of the character array pointed to by <em>data</em> into the string. </p>
</div>
</div>
<a class="anchor" id="gad62f3f0eaf0a991913c826d2fb36c8c2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxsize cx_string_size </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the length of the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The string's length, or 0 for uninitialized or empty strings.</dd></dl>
<p>Computes the length of the string. </p>
</div>
</div>
<a class="anchor" id="ga29362244440619a3d7090259c7549585"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxint cx_string_sprintf </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes to a string under format control. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string to write to. </td></tr>
<tr><td class="paramname">format</td><td>The format string. </td></tr>
<tr><td class="paramname">...</td><td>The arguments to insert into <em>format</em>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of characters (excluding the trailing null) written to <em>self</em>, i.e. its length. If sufficient space cannot be allocated, -1 is returned.</dd></dl>
<p>The function writes the formatted character array to the string. The function works similar to <b>sprintf()</b> function, except that the string's buffer expands automatically to contain the formatted result. The previous contents of the string is destroyed. </p>
<p>Referenced by <a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler()</a>.</p>
</div>
</div>
<a class="anchor" id="gad1c1ed2a92a736ed8900101cdfbd3ce7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_strip </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove leading and trailing whitespaces from the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with leading and trailing whitespaces removed, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function removes leading and trailing whitespace characters from the string. Whitespace characters are recognized by the standard C function <b>isspace()</b>. </p>
</div>
</div>
<a class="anchor" id="gad1c9f69afcebd0ef57d3e5a79fa221ac"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_substr </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new string from a portion of a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>A string. </td></tr>
<tr><td class="paramname">pos</td><td>Position of the first character of the substring. </td></tr>
<tr><td class="paramname">len</td><td>The length of the substring.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns a new string initialized with the characters of the specified substring.</dd></dl>
<p>The function constructs a new string with its value initialized to a copy of a substring of <em>self</em>. The substring is specified by the position of the first character of the substring <em>pos</em>, and the number of characters of the substring <em>len</em> (or the end of the string, whichever comes first).</p>
<p>If <em>pos</em> is equal to the length of <em>self</em>, an empty string is returned. It is an error if <em>pos</em> is greater than the length of <em>self</em>. </p>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>, <a class="el" href="group__cxstring.html#gae21504ed4cde96fd5233167f09d90872">cx_string_create()</a>, and <a class="el" href="group__cxstring.html#ga2677bfd02e0324dcaf6a16146cc5d613">cx_string_new()</a>.</p>
</div>
</div>
<a class="anchor" id="gad38326b29c82dcdc93bfb3252f3c9f49"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_trim </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove leading whitespaces from the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with leading whitespaces removed, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function removes leading whitespace characters from the string. Whitespace characters are recognized by the standard C function <b>isspace()</b>. </p>
</div>
</div>
<a class="anchor" id="ga871347bfc5e8a5beacf9864b250e0fc0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_truncate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>length</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Truncate the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string. </td></tr>
<tr><td class="paramname">length</td><td>The length to which the string is truncated.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The truncated string <em>self</em>, or <code>NULL</code> in case of errors.</dd></dl>
<p>The function removes all characters from the string starting at the character index <em>length</em> up to the end of the string, effectively truncating the string from its original size to a string of length <em>length</em>.</p>
<p>Calling the truncate method is equivalent to: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> cx_string *s;</div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> cx_string_erase(s, length, -1);</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ga8c8b03637f4a99432f40b200bcd9bd0a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a>* cx_string_upper </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Converts the string into uppercase. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed string <em>self</em> with all characters converted to uppercase, or <code>NULL</code> in case of errors.</dd></dl>
<p>All lowercase letters stored in the string are converted to uppercase letters. The conversion is done using the standard C function <b>toupper()</b>. </p>
</div>
</div>
<a class="anchor" id="ga27c9339137a6f0b90cb93cb0bbd1c476"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxint cx_string_vsprintf </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">va_list </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Write to the string from a variable-length argument list under format control. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The string. </td></tr>
<tr><td class="paramname">format</td><td>The format string. </td></tr>
<tr><td class="paramname">args</td><td>Variable-length arguments to be inserted into <em>format</em>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of characters (excluding the trailing null) written to <em>self</em>, i.e. its length. If sufficient space cannot be allocated, -1 is returned.</dd></dl>
<p>The function writes the formatted character array to the string. The function works similar to <b>vsprintf()</b> function, except that the string's buffer expands automatically to contain the formatted result. The previous contents of the string is destroyed. </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
|