| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:45+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "strcmp" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 28 |
#, no-wrap |
| 29 |
msgid "2026-03-16" |
| 30 |
msgstr "" |
| 31 |
|
| 32 |
#. type: TH |
| 33 |
#: archlinux debian-unstable |
| 34 |
#, no-wrap |
| 35 |
msgid "Linux man-pages 6.18" |
| 36 |
msgstr "" |
| 37 |
|
| 38 |
#. type: SH |
| 39 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 40 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 41 |
#, no-wrap |
| 42 |
msgid "NAME" |
| 43 |
msgstr "" |
| 44 |
|
| 45 |
#. type: Plain text |
| 46 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 47 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 48 |
msgid "strcmp, strncmp - compare two strings" |
| 49 |
msgstr "" |
| 50 |
|
| 51 |
#. type: SH |
| 52 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 53 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 54 |
#, no-wrap |
| 55 |
msgid "LIBRARY" |
| 56 |
msgstr "" |
| 57 |
|
| 58 |
#. type: Plain text |
| 59 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 60 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 61 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 62 |
msgstr "" |
| 63 |
|
| 64 |
#. type: SH |
| 65 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 66 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 67 |
#, no-wrap |
| 68 |
msgid "SYNOPSIS" |
| 69 |
msgstr "" |
| 70 |
|
| 71 |
#. type: Plain text |
| 72 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 73 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 74 |
#, no-wrap |
| 75 |
msgid "B<#include E<lt>string.hE<gt>>\n" |
| 76 |
msgstr "" |
| 77 |
|
| 78 |
#. type: Plain text |
| 79 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 80 |
#: opensuse-tumbleweed |
| 81 |
#, no-wrap |
| 82 |
msgid "" |
| 83 |
"B<int strcmp(const char *>I<s1>B<, const char *>I<s2>B<);>\n" |
| 84 |
"B<int strncmp(const char >s1B<[], const char >s2B<[], size_t >nB<);>\n" |
| 85 |
msgstr "" |
| 86 |
|
| 87 |
#. type: SH |
| 88 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 89 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 90 |
#, no-wrap |
| 91 |
msgid "DESCRIPTION" |
| 92 |
msgstr "" |
| 93 |
|
| 94 |
#. type: TP |
| 95 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 96 |
#, no-wrap |
| 97 |
msgid "B<strcmp>()" |
| 98 |
msgstr "" |
| 99 |
|
| 100 |
#. type: Plain text |
| 101 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 102 |
msgid "" |
| 103 |
"The B<strcmp>() function compares the two strings I<s1> and I<s2>, as if by " |
| 104 |
"calling B<memcmp>(3)." |
| 105 |
msgstr "" |
| 106 |
|
| 107 |
#. type: Plain text |
| 108 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 109 |
msgid "" |
| 110 |
"The locale is not taken into account (for a locale-aware comparison, see " |
| 111 |
"B<strcoll>(3))." |
| 112 |
msgstr "" |
| 113 |
|
| 114 |
#. type: Plain text |
| 115 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 116 |
msgid "It is equivalent to" |
| 117 |
msgstr "" |
| 118 |
|
| 119 |
#. type: Plain text |
| 120 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
#, no-wrap |
| 122 |
msgid "memcmp(s1, s2, MIN(strlen(s1),strlen(s2))+1)\n" |
| 123 |
msgstr "" |
| 124 |
|
| 125 |
#. type: TP |
| 126 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 127 |
#, no-wrap |
| 128 |
msgid "B<strncmp>()" |
| 129 |
msgstr "" |
| 130 |
|
| 131 |
#. type: Plain text |
| 132 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 133 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 134 |
msgid "" |
| 135 |
"The B<strncmp>() function is similar, except it compares only the first (at " |
| 136 |
"most) I<n> bytes of I<s1> and I<s2>." |
| 137 |
msgstr "" |
| 138 |
|
| 139 |
#. type: Plain text |
| 140 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 141 |
#, no-wrap |
| 142 |
msgid "memcmp(s1, s2, MIN(MIN(strnlen(s1,n),strnlen(s2,n))+1, n))\n" |
| 143 |
msgstr "" |
| 144 |
|
| 145 |
#. type: SH |
| 146 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 147 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 148 |
#, no-wrap |
| 149 |
msgid "RETURN VALUE" |
| 150 |
msgstr "" |
| 151 |
|
| 152 |
#. type: Plain text |
| 153 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 154 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 155 |
msgid "" |
| 156 |
"The B<strcmp>() and B<strncmp>() functions return an integer less than, " |
| 157 |
"equal to, or greater than zero if I<s1> (or the first I<n> bytes thereof) is " |
| 158 |
"found, respectively, to be less than, to match, or be greater than I<s2>." |
| 159 |
msgstr "" |
| 160 |
|
| 161 |
#. type: SH |
| 162 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 163 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 164 |
#, no-wrap |
| 165 |
msgid "ATTRIBUTES" |
| 166 |
msgstr "" |
| 167 |
|
| 168 |
#. type: Plain text |
| 169 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 170 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 171 |
msgid "" |
| 172 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 173 |
msgstr "" |
| 174 |
|
| 175 |
#. type: tbl table |
| 176 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 177 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 178 |
#, no-wrap |
| 179 |
msgid "Interface" |
| 180 |
msgstr "" |
| 181 |
|
| 182 |
#. type: tbl table |
| 183 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 184 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 185 |
#, no-wrap |
| 186 |
msgid "Attribute" |
| 187 |
msgstr "" |
| 188 |
|
| 189 |
#. type: tbl table |
| 190 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 191 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 192 |
#, no-wrap |
| 193 |
msgid "Value" |
| 194 |
msgstr "" |
| 195 |
|
| 196 |
#. type: tbl table |
| 197 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 198 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 199 |
#, no-wrap |
| 200 |
msgid ".na\n" |
| 201 |
msgstr "" |
| 202 |
|
| 203 |
#. type: tbl table |
| 204 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 205 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 206 |
#, no-wrap |
| 207 |
msgid ".nh\n" |
| 208 |
msgstr "" |
| 209 |
|
| 210 |
#. type: tbl table |
| 211 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 212 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 213 |
#, no-wrap |
| 214 |
msgid "" |
| 215 |
"B<strcmp>(),\n" |
| 216 |
"B<strncmp>()" |
| 217 |
msgstr "" |
| 218 |
|
| 219 |
#. type: tbl table |
| 220 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 221 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 222 |
#, no-wrap |
| 223 |
msgid "Thread safety" |
| 224 |
msgstr "" |
| 225 |
|
| 226 |
#. type: tbl table |
| 227 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 228 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 229 |
#, no-wrap |
| 230 |
msgid "MT-Safe" |
| 231 |
msgstr "" |
| 232 |
|
| 233 |
#. type: SH |
| 234 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 235 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 236 |
#, no-wrap |
| 237 |
msgid "VERSIONS" |
| 238 |
msgstr "" |
| 239 |
|
| 240 |
#. type: Plain text |
| 241 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 242 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 243 |
msgid "POSIX.1 specifies only that:" |
| 244 |
msgstr "" |
| 245 |
|
| 246 |
#. type: Plain text |
| 247 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 248 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 249 |
msgid "" |
| 250 |
"The sign of a nonzero return value shall be determined by the sign of the " |
| 251 |
"difference between the values of the first pair of bytes (both interpreted " |
| 252 |
"as type I<unsigned char>) that differ in the strings being compared." |
| 253 |
msgstr "" |
| 254 |
|
| 255 |
#. type: Plain text |
| 256 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 257 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 258 |
msgid "" |
| 259 |
"In glibc, as in most other implementations, the return value is the " |
| 260 |
"arithmetic result of subtracting the last compared byte in I<s2> from the " |
| 261 |
"last compared byte in I<s1>. (If the two characters are equal, this " |
| 262 |
"difference is 0.)" |
| 263 |
msgstr "" |
| 264 |
|
| 265 |
#. type: SH |
| 266 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 267 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 268 |
#, no-wrap |
| 269 |
msgid "STANDARDS" |
| 270 |
msgstr "" |
| 271 |
|
| 272 |
#. type: Plain text |
| 273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
msgid "C11, POSIX.1-2008." |
| 276 |
msgstr "" |
| 277 |
|
| 278 |
#. type: SH |
| 279 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 280 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 281 |
#, no-wrap |
| 282 |
msgid "HISTORY" |
| 283 |
msgstr "" |
| 284 |
|
| 285 |
#. type: Plain text |
| 286 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 287 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 288 |
msgid "POSIX.1-2001, C89, SVr4, 4.3BSD." |
| 289 |
msgstr "" |
| 290 |
|
| 291 |
#. type: SH |
| 292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 294 |
#, no-wrap |
| 295 |
msgid "EXAMPLES" |
| 296 |
msgstr "" |
| 297 |
|
| 298 |
#. type: Plain text |
| 299 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 300 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 301 |
msgid "" |
| 302 |
"The program below can be used to demonstrate the operation of B<strcmp>() " |
| 303 |
"(when given two arguments) and B<strncmp>() (when given three arguments). " |
| 304 |
"First, some examples using B<strcmp>():" |
| 305 |
msgstr "" |
| 306 |
|
| 307 |
#. type: Plain text |
| 308 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 309 |
#: opensuse-tumbleweed |
| 310 |
#, no-wrap |
| 311 |
msgid "" |
| 312 |
"$B< ./string_comp ABC ABC>;\n" |
| 313 |
"E<lt>str1E<gt> and E<lt>str2E<gt> are equal\n" |
| 314 |
"$B< ./string_comp ABC AB>; # \\[aq]C\\[aq] is ASCII 67; \\[aq]C\\[aq] - \\[aq]\\[rs]0\\[aq] = 67\n" |
| 315 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (67)\n" |
| 316 |
"$B< ./string_comp ABA ABZ>; # \\[aq]A\\[aq] is ASCII 65; \\[aq]Z\\[aq] is ASCII 90\n" |
| 317 |
"E<lt>str1E<gt> is less than E<lt>str2E<gt> (-25)\n" |
| 318 |
"$B< ./string_comp ABJ ABC>;\n" |
| 319 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (7)\n" |
| 320 |
"$B< ./string_comp $\\[aq]\\[rs]201\\[aq] A>; # 0201 - 0101 = 0100 (or 64 decimal)\n" |
| 321 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (64)\n" |
| 322 |
msgstr "" |
| 323 |
|
| 324 |
#. type: Plain text |
| 325 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 326 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 327 |
msgid "" |
| 328 |
"The last example uses B<bash>(1)-specific syntax to produce a string " |
| 329 |
"containing an 8-bit ASCII code; the result demonstrates that the string " |
| 330 |
"comparison uses unsigned characters." |
| 331 |
msgstr "" |
| 332 |
|
| 333 |
#. type: Plain text |
| 334 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 335 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 336 |
msgid "And then some examples using B<strncmp>():" |
| 337 |
msgstr "" |
| 338 |
|
| 339 |
#. type: Plain text |
| 340 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 341 |
#: opensuse-tumbleweed |
| 342 |
#, no-wrap |
| 343 |
msgid "" |
| 344 |
"$B< ./string_comp ABC AB 3>;\n" |
| 345 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (67)\n" |
| 346 |
"$B< ./string_comp ABC AB 2>;\n" |
| 347 |
"E<lt>str1E<gt> and E<lt>str2E<gt> are equal in the first 2 bytes\n" |
| 348 |
msgstr "" |
| 349 |
|
| 350 |
#. type: SS |
| 351 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 352 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 353 |
#, no-wrap |
| 354 |
msgid "Program source" |
| 355 |
msgstr "" |
| 356 |
|
| 357 |
#. type: Plain text |
| 358 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 359 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 360 |
#, no-wrap |
| 361 |
msgid "" |
| 362 |
"/* string_comp.c\n" |
| 363 |
"\\&\n" |
| 364 |
" Licensed under GNU General Public License v2 or later.\n" |
| 365 |
"*/\n" |
| 366 |
"#include E<lt>stdio.hE<gt>\n" |
| 367 |
"#include E<lt>stdlib.hE<gt>\n" |
| 368 |
"#include E<lt>string.hE<gt>\n" |
| 369 |
"\\&\n" |
| 370 |
"int\n" |
| 371 |
"main(int argc, char *argv[])\n" |
| 372 |
"{\n" |
| 373 |
" int res;\n" |
| 374 |
"\\&\n" |
| 375 |
" if (argc E<lt> 3) {\n" |
| 376 |
" fprintf(stderr, \"Usage: %s E<lt>str1E<gt> E<lt>str2E<gt> [E<lt>nE<gt>]\\[rs]n\", argv[0]);\n" |
| 377 |
" exit(EXIT_FAILURE);\n" |
| 378 |
" }\n" |
| 379 |
"\\&\n" |
| 380 |
" if (argc == 3)\n" |
| 381 |
" res = strcmp(argv[1], argv[2]);\n" |
| 382 |
" else\n" |
| 383 |
" res = strncmp(argv[1], argv[2], atoi(argv[3]));\n" |
| 384 |
"\\&\n" |
| 385 |
" if (res == 0) {\n" |
| 386 |
" printf(\"E<lt>str1E<gt> and E<lt>str2E<gt> are equal\");\n" |
| 387 |
" if (argc E<gt> 3)\n" |
| 388 |
" printf(\" in the first %d bytes\\[rs]n\", atoi(argv[3]));\n" |
| 389 |
" printf(\"\\[rs]n\");\n" |
| 390 |
" } else if (res E<lt> 0) {\n" |
| 391 |
" printf(\"E<lt>str1E<gt> is less than E<lt>str2E<gt> (%d)\\[rs]n\", res);\n" |
| 392 |
" } else {\n" |
| 393 |
" printf(\"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (%d)\\[rs]n\", res);\n" |
| 394 |
" }\n" |
| 395 |
"\\&\n" |
| 396 |
" exit(EXIT_SUCCESS);\n" |
| 397 |
"}\n" |
| 398 |
msgstr "" |
| 399 |
|
| 400 |
#. SRC END |
| 401 |
#. type: SH |
| 402 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 403 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 404 |
#, no-wrap |
| 405 |
msgid "SEE ALSO" |
| 406 |
msgstr "" |
| 407 |
|
| 408 |
#. type: Plain text |
| 409 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 410 |
msgid "" |
| 411 |
"B<memcmp>(3), B<strcasecmp>(3), B<strcoll>(3), B<streq>(3), B<string>(3), " |
| 412 |
"B<strncasecmp>(3), B<strverscmp>(3), B<wcscmp>(3), B<wcsncmp>(3), B<ascii>(7)" |
| 413 |
msgstr "" |
| 414 |
|
| 415 |
#. type: TH |
| 416 |
#: debian-trixie |
| 417 |
#, no-wrap |
| 418 |
msgid "2024-06-15" |
| 419 |
msgstr "" |
| 420 |
|
| 421 |
#. type: TH |
| 422 |
#: debian-trixie |
| 423 |
#, no-wrap |
| 424 |
msgid "Linux man-pages 6.9.1" |
| 425 |
msgstr "" |
| 426 |
|
| 427 |
#. type: Plain text |
| 428 |
#: debian-trixie |
| 429 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 430 |
msgstr "" |
| 431 |
|
| 432 |
#. type: Plain text |
| 433 |
#: debian-trixie fedora-44 fedora-rawhide |
| 434 |
#, no-wrap |
| 435 |
msgid "" |
| 436 |
"B<int strcmp(const char *>I<s1>B<, const char *>I<s2>B<);>\n" |
| 437 |
"B<int strncmp(const char >I<s1>B<[.>I<n>B<], const char >I<s2>B<[.>I<n>B<], size_t >I<n>B<);>\n" |
| 438 |
msgstr "" |
| 439 |
|
| 440 |
#. type: Plain text |
| 441 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 442 |
msgid "" |
| 443 |
"The B<strcmp>() function compares the two strings I<s1> and I<s2>. The " |
| 444 |
"locale is not taken into account (for a locale-aware comparison, see " |
| 445 |
"B<strcoll>(3)). The comparison is done using unsigned characters." |
| 446 |
msgstr "" |
| 447 |
|
| 448 |
#. type: Plain text |
| 449 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 450 |
msgid "" |
| 451 |
"B<strcmp>() returns an integer indicating the result of the comparison, as " |
| 452 |
"follows:" |
| 453 |
msgstr "" |
| 454 |
|
| 455 |
#. type: IP |
| 456 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 457 |
#, no-wrap |
| 458 |
msgid "\\[bu]" |
| 459 |
msgstr "" |
| 460 |
|
| 461 |
#. type: Plain text |
| 462 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 463 |
msgid "0, if the I<s1> and I<s2> are equal;" |
| 464 |
msgstr "" |
| 465 |
|
| 466 |
#. type: Plain text |
| 467 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 468 |
msgid "a negative value if I<s1> is less than I<s2>;" |
| 469 |
msgstr "" |
| 470 |
|
| 471 |
#. type: Plain text |
| 472 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 473 |
msgid "a positive value if I<s1> is greater than I<s2>." |
| 474 |
msgstr "" |
| 475 |
|
| 476 |
#. type: Plain text |
| 477 |
#: debian-trixie fedora-44 fedora-rawhide |
| 478 |
#, no-wrap |
| 479 |
msgid "" |
| 480 |
"$ B<./string_comp ABC ABC>\n" |
| 481 |
"E<lt>str1E<gt> and E<lt>str2E<gt> are equal\n" |
| 482 |
"$ B<./string_comp ABC AB> # \\[aq]C\\[aq] is ASCII 67; \\[aq]C\\[aq] - \\[aq]\\[rs]0\\[aq] = 67\n" |
| 483 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (67)\n" |
| 484 |
"$ B<./string_comp ABA ABZ> # \\[aq]A\\[aq] is ASCII 65; \\[aq]Z\\[aq] is ASCII 90\n" |
| 485 |
"E<lt>str1E<gt> is less than E<lt>str2E<gt> (-25)\n" |
| 486 |
"$ B<./string_comp ABJ ABC>\n" |
| 487 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (7)\n" |
| 488 |
"$ .B</string_comp $\\[aq]\\[rs]201\\[aq] A> # 0201 - 0101 = 0100 (or 64 decimal)\n" |
| 489 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (64)\n" |
| 490 |
msgstr "" |
| 491 |
|
| 492 |
#. type: Plain text |
| 493 |
#: debian-trixie fedora-44 fedora-rawhide |
| 494 |
#, no-wrap |
| 495 |
msgid "" |
| 496 |
"$ B<./string_comp ABC AB 3>\n" |
| 497 |
"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (67)\n" |
| 498 |
"$ B<./string_comp ABC AB 2>\n" |
| 499 |
"E<lt>str1E<gt> and E<lt>str2E<gt> are equal in the first 2 bytes\n" |
| 500 |
msgstr "" |
| 501 |
|
| 502 |
#. type: Plain text |
| 503 |
#: debian-trixie |
| 504 |
#, no-wrap |
| 505 |
msgid "" |
| 506 |
"/* string_comp.c\n" |
| 507 |
"\\&\n" |
| 508 |
" Licensed under GNU General Public License v2 or later.\n" |
| 509 |
"*/\n" |
| 510 |
"#include E<lt>stdio.hE<gt>\n" |
| 511 |
"#include E<lt>stdlib.hE<gt>\n" |
| 512 |
"#include E<lt>string.hE<gt>\n" |
| 513 |
"\\&\n" |
| 514 |
"int\n" |
| 515 |
"main(int argc, char *argv[])\n" |
| 516 |
"{\n" |
| 517 |
" int res;\n" |
| 518 |
"\\&\n" |
| 519 |
" if (argc E<lt> 3) {\n" |
| 520 |
" fprintf(stderr, \"Usage: %s E<lt>str1E<gt> E<lt>str2E<gt> [E<lt>lenE<gt>]\\[rs]n\", argv[0]);\n" |
| 521 |
" exit(EXIT_FAILURE);\n" |
| 522 |
" }\n" |
| 523 |
"\\&\n" |
| 524 |
" if (argc == 3)\n" |
| 525 |
" res = strcmp(argv[1], argv[2]);\n" |
| 526 |
" else\n" |
| 527 |
" res = strncmp(argv[1], argv[2], atoi(argv[3]));\n" |
| 528 |
"\\&\n" |
| 529 |
" if (res == 0) {\n" |
| 530 |
" printf(\"E<lt>str1E<gt> and E<lt>str2E<gt> are equal\");\n" |
| 531 |
" if (argc E<gt> 3)\n" |
| 532 |
" printf(\" in the first %d bytes\\[rs]n\", atoi(argv[3]));\n" |
| 533 |
" printf(\"\\[rs]n\");\n" |
| 534 |
" } else if (res E<lt> 0) {\n" |
| 535 |
" printf(\"E<lt>str1E<gt> is less than E<lt>str2E<gt> (%d)\\[rs]n\", res);\n" |
| 536 |
" } else {\n" |
| 537 |
" printf(\"E<lt>str1E<gt> is greater than E<lt>str2E<gt> (%d)\\[rs]n\", res);\n" |
| 538 |
" }\n" |
| 539 |
"\\&\n" |
| 540 |
" exit(EXIT_SUCCESS);\n" |
| 541 |
"}\n" |
| 542 |
msgstr "" |
| 543 |
|
| 544 |
#. type: Plain text |
| 545 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 546 |
msgid "" |
| 547 |
"B<memcmp>(3), B<strcasecmp>(3), B<strcoll>(3), B<string>(3), " |
| 548 |
"B<strncasecmp>(3), B<strverscmp>(3), B<wcscmp>(3), B<wcsncmp>(3), B<ascii>(7)" |
| 549 |
msgstr "" |
| 550 |
|
| 551 |
#. type: TH |
| 552 |
#: fedora-44 fedora-rawhide |
| 553 |
#, no-wrap |
| 554 |
msgid "2024-11-17" |
| 555 |
msgstr "" |
| 556 |
|
| 557 |
#. type: TH |
| 558 |
#: fedora-44 fedora-rawhide |
| 559 |
#, no-wrap |
| 560 |
msgid "Linux man-pages 6.13" |
| 561 |
msgstr "" |
| 562 |
|
| 563 |
#. type: TH |
| 564 |
#: mageia-cauldron |
| 565 |
#, no-wrap |
| 566 |
msgid "2026-02-08" |
| 567 |
msgstr "" |
| 568 |
|
| 569 |
#. type: TH |
| 570 |
#: mageia-cauldron |
| 571 |
#, no-wrap |
| 572 |
msgid "Linux man-pages 6.17" |
| 573 |
msgstr "" |
| 574 |
|
| 575 |
#. type: TH |
| 576 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 577 |
#, no-wrap |
| 578 |
msgid "Linux man-pages (unreleased)" |
| 579 |
msgstr "" |