| 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 "strtok" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 28 |
#, no-wrap |
| 29 |
msgid "2026-02-25" |
| 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-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 47 |
msgid "strtok - extract tokens from strings" |
| 48 |
msgstr "" |
| 49 |
|
| 50 |
#. type: SH |
| 51 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 52 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 53 |
#, no-wrap |
| 54 |
msgid "LIBRARY" |
| 55 |
msgstr "" |
| 56 |
|
| 57 |
#. type: Plain text |
| 58 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 59 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 60 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 61 |
msgstr "" |
| 62 |
|
| 63 |
#. type: SH |
| 64 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 65 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 66 |
#, no-wrap |
| 67 |
msgid "SYNOPSIS" |
| 68 |
msgstr "" |
| 69 |
|
| 70 |
#. type: Plain text |
| 71 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 72 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 73 |
#, no-wrap |
| 74 |
msgid "B<#include E<lt>string.hE<gt>>\n" |
| 75 |
msgstr "" |
| 76 |
|
| 77 |
#. type: Plain text |
| 78 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 79 |
#, no-wrap |
| 80 |
msgid "B<char *strtok(char *_Nullable restrict >I<str>B<, const char *restrict >I<delim>B<);>\n" |
| 81 |
msgstr "" |
| 82 |
|
| 83 |
#. type: SH |
| 84 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 85 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 86 |
#, no-wrap |
| 87 |
msgid "DESCRIPTION" |
| 88 |
msgstr "" |
| 89 |
|
| 90 |
#. type: Plain text |
| 91 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 92 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 93 |
msgid "" |
| 94 |
"The B<strtok>() function breaks a string into a sequence of zero or more " |
| 95 |
"nonempty tokens. On the first call to B<strtok>(), the string to be parsed " |
| 96 |
"should be specified in I<str>. In each subsequent call that should parse " |
| 97 |
"the same string, I<str> must be NULL." |
| 98 |
msgstr "" |
| 99 |
|
| 100 |
#. type: Plain text |
| 101 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 102 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 103 |
msgid "" |
| 104 |
"The I<delim> argument specifies a set of bytes that delimit the tokens in " |
| 105 |
"the parsed string. The caller may specify different strings in I<delim> in " |
| 106 |
"successive calls that parse the same string." |
| 107 |
msgstr "" |
| 108 |
|
| 109 |
#. type: Plain text |
| 110 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 111 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 112 |
msgid "" |
| 113 |
"Each call to B<strtok>() returns a pointer to a null-terminated string " |
| 114 |
"containing the next token. This string does not include the delimiting " |
| 115 |
"byte. If no more tokens are found, B<strtok>() returns NULL." |
| 116 |
msgstr "" |
| 117 |
|
| 118 |
#. type: Plain text |
| 119 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 120 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
msgid "" |
| 122 |
"A sequence of calls to B<strtok>() that operate on the same string " |
| 123 |
"maintains a pointer that determines the point from which to start searching " |
| 124 |
"for the next token. The first call to B<strtok>() sets this pointer to " |
| 125 |
"point to the first byte of the string. The start of the next token is " |
| 126 |
"determined by scanning forward for the next nondelimiter byte in I<str>. If " |
| 127 |
"such a byte is found, it is taken as the start of the next token. If no " |
| 128 |
"such byte is found, then there are no more tokens, and B<strtok>() returns " |
| 129 |
"NULL. (A string that is empty or that contains only delimiters will thus " |
| 130 |
"cause B<strtok>() to return NULL on the first call.)" |
| 131 |
msgstr "" |
| 132 |
|
| 133 |
#. type: Plain text |
| 134 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 135 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 136 |
msgid "" |
| 137 |
"The end of each token is found by scanning forward until either the next " |
| 138 |
"delimiter byte is found or until the terminating null byte (\\[aq]\\[rs]0\\" |
| 139 |
"[aq]) is encountered. If a delimiter byte is found, it is overwritten with " |
| 140 |
"a null byte to terminate the current token, and B<strtok>() saves a pointer " |
| 141 |
"to the following byte; that pointer will be used as the starting point when " |
| 142 |
"searching for the next token. In this case, B<strtok>() returns a pointer " |
| 143 |
"to the start of the found token." |
| 144 |
msgstr "" |
| 145 |
|
| 146 |
#. type: Plain text |
| 147 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 148 |
#: opensuse-tumbleweed |
| 149 |
msgid "" |
| 150 |
"From the above description, it follows that a sequence of two or more " |
| 151 |
"contiguous delimiter bytes in the parsed string is considered to be a single " |
| 152 |
"delimiter, and that delimiter bytes at the start or end of the string are " |
| 153 |
"ignored. Put another way: the tokens returned by B<strtok>() are always " |
| 154 |
"nonempty strings. Thus, for example, given the string \\[dq]I<aaa;;bbb,>\\" |
| 155 |
"[dq], successive calls to B<strtok>() that specify the delimiter string \\" |
| 156 |
"[dq]I<;,>\\[dq] would return the strings \\[dq]I<aaa>\\[dq] and \\" |
| 157 |
"[dq]I<bbb>\\[dq], and then a null pointer." |
| 158 |
msgstr "" |
| 159 |
|
| 160 |
#. type: SH |
| 161 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 162 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 163 |
#, no-wrap |
| 164 |
msgid "RETURN VALUE" |
| 165 |
msgstr "" |
| 166 |
|
| 167 |
#. type: Plain text |
| 168 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 169 |
msgid "" |
| 170 |
"B<strtok>() returns a pointer to the next token, or NULL if there are no " |
| 171 |
"more tokens." |
| 172 |
msgstr "" |
| 173 |
|
| 174 |
#. type: SH |
| 175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 177 |
#, no-wrap |
| 178 |
msgid "ATTRIBUTES" |
| 179 |
msgstr "" |
| 180 |
|
| 181 |
#. type: Plain text |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
msgid "" |
| 185 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 186 |
msgstr "" |
| 187 |
|
| 188 |
#. type: tbl table |
| 189 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 190 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 191 |
#, no-wrap |
| 192 |
msgid "Interface" |
| 193 |
msgstr "" |
| 194 |
|
| 195 |
#. type: tbl table |
| 196 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 197 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 198 |
#, no-wrap |
| 199 |
msgid "Attribute" |
| 200 |
msgstr "" |
| 201 |
|
| 202 |
#. type: tbl table |
| 203 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 204 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 205 |
#, no-wrap |
| 206 |
msgid "Value" |
| 207 |
msgstr "" |
| 208 |
|
| 209 |
#. type: tbl table |
| 210 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 211 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 212 |
#, no-wrap |
| 213 |
msgid ".na\n" |
| 214 |
msgstr "" |
| 215 |
|
| 216 |
#. type: tbl table |
| 217 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 218 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 219 |
#, no-wrap |
| 220 |
msgid ".nh\n" |
| 221 |
msgstr "" |
| 222 |
|
| 223 |
#. #-#-#-#-# archlinux: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 224 |
#. type: tbl table |
| 225 |
#. #-#-#-#-# debian-trixie: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 226 |
#. type: TP |
| 227 |
#. #-#-#-#-# debian-unstable: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 228 |
#. type: tbl table |
| 229 |
#. #-#-#-#-# fedora-44: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 230 |
#. type: TP |
| 231 |
#. #-#-#-#-# fedora-rawhide: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 232 |
#. type: TP |
| 233 |
#. #-#-#-#-# mageia-cauldron: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 234 |
#. type: TP |
| 235 |
#. #-#-#-#-# opensuse-leap-16-1: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 236 |
#. type: tbl table |
| 237 |
#. #-#-#-#-# opensuse-tumbleweed: strtok.3.pot (PACKAGE VERSION) #-#-#-#-# |
| 238 |
#. type: tbl table |
| 239 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 240 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 241 |
#, no-wrap |
| 242 |
msgid "B<strtok>()" |
| 243 |
msgstr "" |
| 244 |
|
| 245 |
#. type: tbl table |
| 246 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 247 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 248 |
#, no-wrap |
| 249 |
msgid "Thread safety" |
| 250 |
msgstr "" |
| 251 |
|
| 252 |
#. type: tbl table |
| 253 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 254 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 255 |
#, no-wrap |
| 256 |
msgid "MT-Unsafe race:strtok" |
| 257 |
msgstr "" |
| 258 |
|
| 259 |
#. type: SH |
| 260 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 261 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 262 |
#, no-wrap |
| 263 |
msgid "STANDARDS" |
| 264 |
msgstr "" |
| 265 |
|
| 266 |
#. type: Plain text |
| 267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 269 |
msgid "C11, POSIX.1-2008." |
| 270 |
msgstr "" |
| 271 |
|
| 272 |
#. type: SH |
| 273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
#, no-wrap |
| 276 |
msgid "HISTORY" |
| 277 |
msgstr "" |
| 278 |
|
| 279 |
#. type: Plain text |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
msgid "POSIX.1-2001, C89, SVr4, 4.3BSD." |
| 283 |
msgstr "" |
| 284 |
|
| 285 |
#. type: SH |
| 286 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 287 |
#, no-wrap |
| 288 |
msgid "CAVEATS" |
| 289 |
msgstr "" |
| 290 |
|
| 291 |
#. type: Plain text |
| 292 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 293 |
msgid "Be cautious when using this function. If you do use it, note that:" |
| 294 |
msgstr "" |
| 295 |
|
| 296 |
#. type: IP |
| 297 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 298 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 299 |
#, no-wrap |
| 300 |
msgid "\\[bu]" |
| 301 |
msgstr "" |
| 302 |
|
| 303 |
#. type: Plain text |
| 304 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 305 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 306 |
msgid "The identity of the delimiting byte is lost." |
| 307 |
msgstr "" |
| 308 |
|
| 309 |
#. type: Plain text |
| 310 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 311 |
msgid "" |
| 312 |
"The B<strtok>() function uses a static buffer while parsing, so it's not " |
| 313 |
"thread safe. Use B<strtok_r>(3) if this matters to you." |
| 314 |
msgstr "" |
| 315 |
|
| 316 |
#. type: SH |
| 317 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 318 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 319 |
#, no-wrap |
| 320 |
msgid "EXAMPLES" |
| 321 |
msgstr "" |
| 322 |
|
| 323 |
#. type: Plain text |
| 324 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 325 |
msgid "See B<getaddrinfo_a>(3)." |
| 326 |
msgstr "" |
| 327 |
|
| 328 |
#. type: SH |
| 329 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 330 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 331 |
#, no-wrap |
| 332 |
msgid "SEE ALSO" |
| 333 |
msgstr "" |
| 334 |
|
| 335 |
#. type: Plain text |
| 336 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 337 |
msgid "" |
| 338 |
"B<memchr>(3), B<strchr>(3), B<string>(3), B<strpbrk>(3), B<strsep>(3), " |
| 339 |
"B<strspn>(3), B<strstr>(3), B<strtok_r>(3), B<wcstok>(3)" |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
#. type: TH |
| 343 |
#: debian-trixie |
| 344 |
#, no-wrap |
| 345 |
msgid "2024-06-16" |
| 346 |
msgstr "" |
| 347 |
|
| 348 |
#. type: TH |
| 349 |
#: debian-trixie |
| 350 |
#, no-wrap |
| 351 |
msgid "Linux man-pages 6.9.1" |
| 352 |
msgstr "" |
| 353 |
|
| 354 |
#. type: Plain text |
| 355 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 356 |
msgid "strtok, strtok_r - extract tokens from strings" |
| 357 |
msgstr "" |
| 358 |
|
| 359 |
#. type: Plain text |
| 360 |
#: debian-trixie |
| 361 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 362 |
msgstr "" |
| 363 |
|
| 364 |
#. type: Plain text |
| 365 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 366 |
#, no-wrap |
| 367 |
msgid "" |
| 368 |
"B<char *strtok(char *_Nullable restrict >I<str>B<, const char *restrict >I<delim>B<);>\n" |
| 369 |
"B<char *strtok_r(char *_Nullable restrict >I<str>B<, const char *restrict >I<delim>B<,>\n" |
| 370 |
"B< char **restrict >I<saveptr>B<);>\n" |
| 371 |
msgstr "" |
| 372 |
|
| 373 |
#. type: Plain text |
| 374 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 375 |
msgid "" |
| 376 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 377 |
msgstr "" |
| 378 |
|
| 379 |
#. type: Plain text |
| 380 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 381 |
msgid "B<strtok_r>():" |
| 382 |
msgstr "" |
| 383 |
|
| 384 |
#. type: Plain text |
| 385 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 386 |
#, no-wrap |
| 387 |
msgid "" |
| 388 |
" _POSIX_C_SOURCE\n" |
| 389 |
" || /* glibc E<lt>= 2.19: */ _BSD_SOURCE || _SVID_SOURCE\n" |
| 390 |
msgstr "" |
| 391 |
|
| 392 |
#. type: Plain text |
| 393 |
#: debian-trixie fedora-44 fedora-rawhide |
| 394 |
msgid "" |
| 395 |
"From the above description, it follows that a sequence of two or more " |
| 396 |
"contiguous delimiter bytes in the parsed string is considered to be a single " |
| 397 |
"delimiter, and that delimiter bytes at the start or end of the string are " |
| 398 |
"ignored. Put another way: the tokens returned by B<strtok>() are always " |
| 399 |
"nonempty strings. Thus, for example, given the string \"I<aaa;;bbb,>\", " |
| 400 |
"successive calls to B<strtok>() that specify the delimiter string \"I<;,>\" " |
| 401 |
"would return the strings \"I<aaa>\" and \"I<bbb>\", and then a null pointer." |
| 402 |
msgstr "" |
| 403 |
|
| 404 |
#. type: Plain text |
| 405 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 406 |
msgid "" |
| 407 |
"The B<strtok_r>() function is a reentrant version of B<strtok>(). The " |
| 408 |
"I<saveptr> argument is a pointer to a I<char\\ *> variable that is used " |
| 409 |
"internally by B<strtok_r>() in order to maintain context between successive " |
| 410 |
"calls that parse the same string." |
| 411 |
msgstr "" |
| 412 |
|
| 413 |
#. type: Plain text |
| 414 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 415 |
msgid "" |
| 416 |
"On the first call to B<strtok_r>(), I<str> should point to the string to be " |
| 417 |
"parsed, and the value of I<*saveptr> is ignored (but see VERSIONS). In " |
| 418 |
"subsequent calls, I<str> should be NULL, and I<saveptr> (and the buffer that " |
| 419 |
"it points to) should be unchanged since the previous call." |
| 420 |
msgstr "" |
| 421 |
|
| 422 |
#. type: Plain text |
| 423 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 424 |
msgid "" |
| 425 |
"Different strings may be parsed concurrently using sequences of calls to " |
| 426 |
"B<strtok_r>() that specify different I<saveptr> arguments." |
| 427 |
msgstr "" |
| 428 |
|
| 429 |
#. type: Plain text |
| 430 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 431 |
msgid "" |
| 432 |
"The B<strtok>() and B<strtok_r>() functions return a pointer to the next " |
| 433 |
"token, or NULL if there are no more tokens." |
| 434 |
msgstr "" |
| 435 |
|
| 436 |
#. type: TP |
| 437 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 438 |
#, no-wrap |
| 439 |
msgid "B<strtok_r>()" |
| 440 |
msgstr "" |
| 441 |
|
| 442 |
#. type: tbl table |
| 443 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 444 |
#, no-wrap |
| 445 |
msgid "MT-Safe" |
| 446 |
msgstr "" |
| 447 |
|
| 448 |
#. type: SH |
| 449 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 450 |
#, no-wrap |
| 451 |
msgid "VERSIONS" |
| 452 |
msgstr "" |
| 453 |
|
| 454 |
#. Tru64, according to its manual page |
| 455 |
#. type: Plain text |
| 456 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 457 |
msgid "" |
| 458 |
"On some implementations, I<*saveptr> is required to be NULL on the first " |
| 459 |
"call to B<strtok_r>() that is being used to parse I<str>." |
| 460 |
msgstr "" |
| 461 |
|
| 462 |
#. type: Plain text |
| 463 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 464 |
msgid "POSIX.1-2008." |
| 465 |
msgstr "" |
| 466 |
|
| 467 |
#. type: Plain text |
| 468 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 469 |
msgid "POSIX.1-2001." |
| 470 |
msgstr "" |
| 471 |
|
| 472 |
#. type: SH |
| 473 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 474 |
#, no-wrap |
| 475 |
msgid "BUGS" |
| 476 |
msgstr "" |
| 477 |
|
| 478 |
#. type: Plain text |
| 479 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 480 |
msgid "Be cautious when using these functions. If you do use them, note that:" |
| 481 |
msgstr "" |
| 482 |
|
| 483 |
#. type: Plain text |
| 484 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 485 |
msgid "These functions modify their first argument." |
| 486 |
msgstr "" |
| 487 |
|
| 488 |
#. type: Plain text |
| 489 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 490 |
msgid "These functions cannot be used on constant strings." |
| 491 |
msgstr "" |
| 492 |
|
| 493 |
#. type: Plain text |
| 494 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 495 |
msgid "" |
| 496 |
"The B<strtok>() function uses a static buffer while parsing, so it's not " |
| 497 |
"thread safe. Use B<strtok_r>() if this matters to you." |
| 498 |
msgstr "" |
| 499 |
|
| 500 |
#. type: Plain text |
| 501 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 502 |
msgid "" |
| 503 |
"The program below uses nested loops that employ B<strtok_r>() to break a " |
| 504 |
"string into a two-level hierarchy of tokens. The first command-line " |
| 505 |
"argument specifies the string to be parsed. The second argument specifies " |
| 506 |
"the delimiter byte(s) to be used to separate that string into \"major\" " |
| 507 |
"tokens. The third argument specifies the delimiter byte(s) to be used to " |
| 508 |
"separate the \"major\" tokens into subtokens." |
| 509 |
msgstr "" |
| 510 |
|
| 511 |
#. type: Plain text |
| 512 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 513 |
msgid "An example of the output produced by this program is the following:" |
| 514 |
msgstr "" |
| 515 |
|
| 516 |
#. type: Plain text |
| 517 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 518 |
#, no-wrap |
| 519 |
msgid "" |
| 520 |
"$B< ./a.out \\[aq]a/bbb///cc;xxx:yyy:\\[aq] \\[aq]:;\\[aq] \\[aq]/\\[aq]>\n" |
| 521 |
"1: a/bbb///cc\n" |
| 522 |
" --E<gt> a\n" |
| 523 |
" --E<gt> bbb\n" |
| 524 |
" --E<gt> cc\n" |
| 525 |
"2: xxx\n" |
| 526 |
" --E<gt> xxx\n" |
| 527 |
"3: yyy\n" |
| 528 |
" --E<gt> yyy\n" |
| 529 |
msgstr "" |
| 530 |
|
| 531 |
#. type: SS |
| 532 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 533 |
#, no-wrap |
| 534 |
msgid "Program source" |
| 535 |
msgstr "" |
| 536 |
|
| 537 |
#. type: Plain text |
| 538 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 539 |
#, no-wrap |
| 540 |
msgid "" |
| 541 |
"#include E<lt>stdio.hE<gt>\n" |
| 542 |
"#include E<lt>stdlib.hE<gt>\n" |
| 543 |
"#include E<lt>string.hE<gt>\n" |
| 544 |
"\\&\n" |
| 545 |
"int\n" |
| 546 |
"main(int argc, char *argv[])\n" |
| 547 |
"{\n" |
| 548 |
" char *str1, *str2, *token, *subtoken;\n" |
| 549 |
" char *saveptr1, *saveptr2;\n" |
| 550 |
" int j;\n" |
| 551 |
"\\&\n" |
| 552 |
" if (argc != 4) {\n" |
| 553 |
" fprintf(stderr, \"Usage: %s string delim subdelim\\[rs]n\",\n" |
| 554 |
" argv[0]);\n" |
| 555 |
" exit(EXIT_FAILURE);\n" |
| 556 |
" }\n" |
| 557 |
"\\&\n" |
| 558 |
" for (j = 1, str1 = argv[1]; ; j++, str1 = NULL) {\n" |
| 559 |
" token = strtok_r(str1, argv[2], &saveptr1);\n" |
| 560 |
" if (token == NULL)\n" |
| 561 |
" break;\n" |
| 562 |
" printf(\"%d: %s\\[rs]n\", j, token);\n" |
| 563 |
"\\&\n" |
| 564 |
" for (str2 = token; ; str2 = NULL) {\n" |
| 565 |
" subtoken = strtok_r(str2, argv[3], &saveptr2);\n" |
| 566 |
" if (subtoken == NULL)\n" |
| 567 |
" break;\n" |
| 568 |
" printf(\"\\[rs]t --E<gt> %s\\[rs]n\", subtoken);\n" |
| 569 |
" }\n" |
| 570 |
" }\n" |
| 571 |
"\\&\n" |
| 572 |
" exit(EXIT_SUCCESS);\n" |
| 573 |
"}\n" |
| 574 |
msgstr "" |
| 575 |
|
| 576 |
#. type: Plain text |
| 577 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 578 |
msgid "" |
| 579 |
"Another example program using B<strtok>() can be found in " |
| 580 |
"B<getaddrinfo_a>(3)." |
| 581 |
msgstr "" |
| 582 |
|
| 583 |
#. type: Plain text |
| 584 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 585 |
msgid "" |
| 586 |
"B<memchr>(3), B<strchr>(3), B<string>(3), B<strpbrk>(3), B<strsep>(3), " |
| 587 |
"B<strspn>(3), B<strstr>(3), B<wcstok>(3)" |
| 588 |
msgstr "" |
| 589 |
|
| 590 |
#. type: TH |
| 591 |
#: fedora-44 fedora-rawhide |
| 592 |
#, no-wrap |
| 593 |
msgid "2024-07-23" |
| 594 |
msgstr "" |
| 595 |
|
| 596 |
#. type: TH |
| 597 |
#: fedora-44 fedora-rawhide |
| 598 |
#, no-wrap |
| 599 |
msgid "Linux man-pages 6.13" |
| 600 |
msgstr "" |
| 601 |
|
| 602 |
#. type: TH |
| 603 |
#: mageia-cauldron |
| 604 |
#, no-wrap |
| 605 |
msgid "2026-02-08" |
| 606 |
msgstr "" |
| 607 |
|
| 608 |
#. type: TH |
| 609 |
#: mageia-cauldron |
| 610 |
#, no-wrap |
| 611 |
msgid "Linux man-pages 6.17" |
| 612 |
msgstr "" |
| 613 |
|
| 614 |
#. type: TH |
| 615 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 616 |
#, no-wrap |
| 617 |
msgid "Linux man-pages (unreleased)" |
| 618 |
msgstr "" |