company logo

MP3Header :: replaceFrames - Replace frames by mask

The function replaces frames according to a mask for a string containing frame values. Frame identifier are passed in sFrameMask enclosed in %...% at position in the string, where appropriate frame values are expected in the string passed in sText. Frames are replaced or inserted at front of the header.

// Passing following string and mask

string: "1967 - Jimmy Hendrix - Purple Haze (from Are You Experienced)"

mask: "%TDRC% - %TPE1% - %TIT2% (from %TALB%)

// will return following frames:

TDRC=1967

TPE1=Jimmy Hendrix

TIT2=Purple Haze

TALB=Are You Experienced

Implementation details

MP3Header  :: replaceFrames ( odaba::String &sFrameMask, odaba::String &sText )
  • sFrameMask - MP3 frame mask

    An MP3 frame mask consists of a sequence of frame identifiers (each four characters enclosed in %...%) as place holder for frame values and fixed text considered as separator between frame values.

  • sText - Text string

    The text string contains text with any kind of character encoding.