DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Static Public Member Functions | List of all members
OFStringUtil Class Reference

## Static Public Member Functions
static void | replace_all (OFString &src, const OFString &pattern, const OFString &rplc)
| replace all occurrences of a pattern in the given string (in-place) with another string. More...
static OFString | replace_all (const OFString &src, const OFString &pattern, const OFString &rplc)
| replace all occurrences of a pattern in the given string with another string and return a copy of result. More...

## Member Function Documentation

## ◆ replace_all() [1/2]

static OFString OFStringUtil::replace_all | ( | const OFString & | src,
|  | const OFString & | pattern,
|  | const OFString & | rplc
| ) |  |
| static

replace all occurrences of a pattern in the given string with another string and return a copy of result.

Parameters

  src | source string to perform replacement on
  pattern | the pattern to search for in src string
  rplc | replacement string that is inserted whenever pattern is found

Returns
  resulting string with all occurrences of pattern being replaced with rplc string

## ◆ replace_all() [2/2]

static void OFStringUtil::replace_all | ( | OFString & | src,
|  | const OFString & | pattern,
|  | const OFString & | rplc
| ) |  |
| static

replace all occurrences of a pattern in the given string (in-place) with another string.

Parameters

  src | string to perform replacement on and that will contain the result
  pattern | the pattern to search for in src string
  rplc | the replacement string that is inserted whenever pattern is found

The documentation for this class was generated from the following file:

- ofstd/include/dcmtk/ofstd/ofstrutl.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1