Lines Matching refs:str
176 ped_strdup (const char *str)
179 result = ped_malloc (strlen (str) + 1);
182 strcpy (result, str);
302 * If \p str contains a valid description of a location on \p dev,
310 * \return \c 1 if \p str is a valid location description, \c 0 otherwise
313 ped_unit_parse (const char* str, const PedDevice* dev, PedSector *sector,
316 return ped_unit_parse_custom (str, dev, default_unit, sector, range);
321 strip_string (char* str)
325 for (i = 0; str[i] != 0; i++) {
326 if (isspace (str[i])) {
328 for (j = i + 1; str[j] != 0; j++)
329 str[j - 1] = str[j];
338 find_suffix (const char* str)
340 while (str[0] != 0 && (isdigit (str[0]) || strchr(",.-", str[0])))
341 str++;
342 return (char *) str;
346 remove_punct (char* str)
350 for (i = 0; str[i]; i++) {
351 if (ispunct (str[i]))
352 str[i] = ' ';
357 is_chs (const char* str)
362 for (i = 0; str[i]; i++)
363 punct_count += ispunct (str[i]) != 0;
368 parse_chs (const char* str, const PedDevice* dev, PedSector* sector,
374 char* copy = ped_strdup (str);
413 str, dev->path);
484 * If \p str contains a valid description of a location on \p dev, then
492 * \throws PED_EXCEPTION_ERROR if \p str contains invalid description of a
494 * \throws PED_EXCEPTION_ERROR if location described by \p str
497 * \return \c 1 if \p str is a valid location description, \c 0 otherwise.
500 ped_unit_parse_custom (const char* str, const PedDevice* dev, PedUnit unit,
509 if (is_chs (str))
510 return parse_chs (str, dev, sector, range);
512 copy = ped_strdup (str);
545 str, dev->path);