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
|
<!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.6"/>
<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 style="padding-left: 0.5em;">
<div id="projectname">C Standard Library Extensions
 <span id="projectnumber">1.1.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<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, initialized 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>
</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>
</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="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, initialized string container. </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly created string.</dd></dl>
<p>The function allocates memory for the string and initializes it, i.e. the member functions are hooked into the newly created 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>.</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="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="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 class="code" href="group__cxstring.html#ga48dfca37e3a62f7fe98edc3f38c0faeb">cx_string</a> *s;</div>
<div class="line"></div>
<div class="line"><a class="code" href="group__cxstring.html#gac36b30ef4a5fa1036a333964db2ddbd0">cx_string_erase</a>(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.6
</small></address>
</body>
</html>
|