XMP Toolkit SDK  6.0.0
AdobeXMPCommon::IUTF8String_v1 Class Referenceabstract

Version1 of the interface that represents an UTF8String. More...

#include <IUTF8String.h>

Inheritance diagram for AdobeXMPCommon::IUTF8String_v1:
AdobeXMPCommon::ISharedObject AdobeXMPCommon::IVersionable

Public Member Functions

virtual spIUTF8String APICALL append (const char *buf, sizet count)=0
 Appends more content into the existing string object through a pointer to char buffer. More...
 
virtual spIUTF8String APICALL append (const spcIUTF8String &src, sizet srcPos=0, sizet count=npos)=0
 Appends the contents of another string into the existing string. More...
 
virtual spIUTF8String APICALL assign (const char *buf, sizet count)=0
 Overwrites new string content into the existing string object through a pointer to char buffer. More...
 
virtual spIUTF8String APICALL assign (const spcIUTF8String &src, sizet srcPos=0, sizet count=npos)=0
 Overwrites the contents with contents of another string. More...
 
virtual spIUTF8String APICALL insert (sizet pos, const char *buf, sizet count)=0
 Inserts additional characters into the string right before the character indicated by pos. More...
 
virtual spIUTF8String APICALL insert (sizet pos, const spcIUTF8String &src, sizet srcPos=0, sizet count=npos)=0
 Inserts additional characters into the string right before the character indicated by pos. More...
 
virtual spIUTF8String APICALL erase (sizet pos=0, sizet count=npos)=0
 Erases part of the string, reducing its length. More...
 
virtual void APICALL resize (sizet n)=0
 Resizes the string to the length of n characters. /param[in] n New string length, expressed in number of characters. More...
 
virtual spIUTF8String APICALL replace (sizet pos, sizet count, const char *buf, sizet srcCount)=0
 Replace portion of string. More...
 
virtual spIUTF8String APICALL replace (sizet pos, sizet count, const spcIUTF8String &src, sizet srcPos=0, sizet srcCount=npos)=0
 Replace portion of string. More...
 
virtual sizet APICALL copy (char *buf, sizet len, sizet pos=0) const =0
 Copy sequence of characters from string. More...
 
sizet find (const char *buf, sizet pos=0) const
 Find content in string. More...
 
virtual sizet APICALL find (const char *buf, sizet pos, sizet count) const =0
 Find content in string. More...
 
virtual sizet APICALL find (const spcIUTF8String &src, sizet pos=0, sizet count=npos) const =0
 Find content in string. More...
 
sizet rfind (const char *buf, sizet pos=npos) const
 Find last occurrence of content in string. More...
 
virtual sizet APICALL rfind (const char *buf, sizet pos, sizet count) const =0
 
virtual sizet APICALL rfind (const spcIUTF8String &src, sizet pos=npos, sizet count=npos) const =0
 Find last occurrence of content in string. More...
 
- Public Member Functions inherited from AdobeXMPCommon::ISharedObject
virtual void APICALL Acquire () const __NOTHROW__=0
 Called by the clients of the object to indicate that he has acquired the shared ownership of the object. More...
 
virtual void APICALL Release () const __NOTHROW__=0
 Called by the clients of the object to indicate he has released his shared ownership of the object. If this being the last client than this function should call Destroy to delete and release the memory. More...
 
- Public Member Functions inherited from AdobeXMPCommon::IVersionable
template<typename requestedInterface >
XMP_PRIVATE requestedInterface * GetInterfacePointer ()
 Get the raw pointer to an interface object implementing the requested version. More...
 
template<typename requestedInterface >
const XMP_PRIVATE requestedInterface * GetInterfacePointer () const
 Get the raw pointer to a const interface object implementing the requested version. More...
 
int32 compare (const char *buf) const
 Compare strings. More...
 
int32 compare (sizet pos, sizet len, const char *buf) const
 Compare strings. More...
 
virtual int32 APICALL compare (sizet pos, sizet len, const char *buf, sizet count) const =0
 Compare strings. More...
 
int32 compare (const spcIUTF8String &str) const
 Compare strings. More...
 
virtual int32 APICALL compare (sizet pos, sizet len, const spcIUTF8String &str, sizet strPos=0, sizet strLen=npos) const =0
 Compare strings. More...
 
virtual spIUTF8String APICALL substr (sizet pos=0, sizet count=npos) const =0
 Returns a new string object which contains a sub string of the actual string object. More...
 
virtual bool APICALL empty () const =0
 Indicates whether the string object is empty or not. More...
 
virtual const char *APICALL c_str () const __NOTHROW__=0
 Provides access to the actual location where contents of string are stored. More...
 
virtual void APICALL clear () __NOTHROW__=0
 Clears the contents of the string object. More...
 
virtual sizet APICALL size () const __NOTHROW__=0
 Indicates the number of bytes used by the contents of the string object. More...
 
static XMP_PRIVATE spIUTF8String CreateUTF8String (pIObjectFactory objFactory)
 Creates an empty IUTF8String object. More...
 
static XMP_PRIVATE spIUTF8String CreateUTF8String (pIObjectFactory objFactory, const char *buf, sizet count)
 Creates an IUTF8String object whose initial contents are copied from a char buffer. More...
 
virtual ~IUTF8String_v1 () __NOTHROW__
 

Additional Inherited Members

- Protected Member Functions inherited from AdobeXMPCommon::ISharedObject
virtual ~ISharedObject () __NOTHROW__=0
 
 REQ_FRIEND_CLASS_DECLARATION ()
 
- Protected Member Functions inherited from AdobeXMPCommon::IVersionable
virtual ~IVersionable ()
 
 REQ_FRIEND_CLASS_DECLARATION ()
 

Detailed Description

Version1 of the interface that represents an UTF8String.

Provides all the functions to access properties of the string object, appends or assigns content to the existing string objects and clones existing string objects.

Definition at line 25 of file IUTF8String.h.

Constructor & Destructor Documentation

◆ ~IUTF8String_v1()

virtual AdobeXMPCommon::IUTF8String_v1::~IUTF8String_v1 ( )
inlineprotectedvirtual

Destructor

Definition at line 475 of file IUTF8String.h.

475 {}

Member Function Documentation

◆ append() [1/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::append ( const char *  buf,
sizet  count 
)
pure virtual

Appends more content into the existing string object through a pointer to char buffer.

Parameters
[in]bufpointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]countA value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.

◆ append() [2/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::append ( const spcIUTF8String src,
sizet  srcPos = 0,
sizet  count = npos 
)
pure virtual

Appends the contents of another string into the existing string.

Parameters
[in]srcShared pointer to const #AdobeXMPCommon::IUTF8String whose contents will be appended to existing content in the object. Invalid shared pointer will be treated as empty string.
[in]srcPosA value of #AdobeXMPCommon::sizet indicating the position of the first character in src that is inserted into the object as a substring.
[in]countA value of #AdobeXMPCommon::sizet indicating the length of the substring to be copied (if the string is shorter, as many characters as possible are copied). A value of npos indicates all characters until the end of src.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.
Attention
Error is thrown in case
  • srcPos is greater than length of src.

◆ assign() [1/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::assign ( const char *  buf,
sizet  count 
)
pure virtual

Overwrites new string content into the existing string object through a pointer to char buffer.

Parameters
[in]bufpointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]countA value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.

◆ assign() [2/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::assign ( const spcIUTF8String src,
sizet  srcPos = 0,
sizet  count = npos 
)
pure virtual

Overwrites the contents with contents of another string.

Parameters
[in]srcshared pointer to const #AdobeXMPCommon::IUTF8String whose contents will overwrite existing content in the object. Invalid shared pointer will be treated as empty string.
[in]srcPosA value of #AdobeXMPCommon::sizet indicating the position of the first character in src that is inserted into the object as a substring.
[in]countA value of #AdobeXMPCommon::sizet indicating the length of the substring to be copied. A value of npos indicates all characters until the end of src. If this is greater than the available characters in the substring then copying is limited to the number of available characters.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.
Attention
Error is thrown in case
  • srcPos is greater than length of src.

◆ c_str()

virtual const char* APICALL AdobeXMPCommon::IUTF8String_v1::c_str ( ) const
pure virtual

Provides access to the actual location where contents of string are stored.

Returns
A pointer to a buffer of const chars containing the contents of the string object.

◆ clear()

virtual void APICALL AdobeXMPCommon::IUTF8String_v1::clear ( )
pure virtual

Clears the contents of the string object.

◆ compare() [1/5]

int32 AdobeXMPCommon::IUTF8String_v1::compare ( const char *  buf) const
inline

Compare strings.

Compares the value of the string object (or a substring) to the sequence of characters specified by its arguments.

Parameters
[in]bufpointer to a constant char buffer containing content to be compared. It can be null terminated or not. NULL pointer will be treated as empty string.
Returns
Returns a signed integral indicating the relation between the strings
value relation between compared string and comparing string
0 They compare equal
<0 Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter.
>0 Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer.
Attention
Error is thrown in case
  • pos is greater than the object's length.

Definition at line 285 of file IUTF8String.h.

285  {
286  return compare( 0, size(), buf, npos );
287  }

References AdobeXMPCommon::npos().

◆ compare() [2/5]

int32 AdobeXMPCommon::IUTF8String_v1::compare ( const spcIUTF8String str) const
inline

Compare strings.

Compares the value of the string object (or a substring) to the contents of an string or substring object specified by its arguments.

Parameters
[in]strshared pointer to const #AdobeXMPCommon::IUTF8String containing content to be compared. Invalid shared pointer will be treated as empty string.
Returns
Returns a signed integral indicating the relation between the strings
value relation between compared string and comparing string
0 They compare equal
<0 Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter.
>0 Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer.
Attention
Error is thrown in case
  • strPos is greater than length of str.
  • pos is greater than the object's length.

Definition at line 349 of file IUTF8String.h.

349  {
350  return compare( 0, size(), str, 0, str->size() );
351  }

◆ compare() [3/5]

int32 AdobeXMPCommon::IUTF8String_v1::compare ( sizet  pos,
sizet  len,
const char *  buf 
) const
inline

Compare strings.

Compares the value of the string object (or a substring) to the sequence of characters specified by its arguments.

Parameters
[in]bufpointer to a constant char buffer containing content to be compared. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]posPosition of the first character in the compared string. If this is greater than the string length, it is treated as empty string.
[in]lenLength of compared string (if the string is shorter, as many characters as possible). A value of npos indicates all characters until the end of the string.
Returns
Returns a signed integral indicating the relation between the strings
value relation between compared string and comparing string
0 They compare equal
<0 Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter.
>0 Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer.
Attention
Error is thrown in case
  • pos is greater than the object's length.

Definition at line 307 of file IUTF8String.h.

307  {
308  return compare( pos, len, buf, npos );
309  }

References AdobeXMPCommon::npos().

◆ compare() [4/5]

virtual int32 APICALL AdobeXMPCommon::IUTF8String_v1::compare ( sizet  pos,
sizet  len,
const char *  buf,
sizet  count 
) const
pure virtual

Compare strings.

Compares the value of the string object (or a substring) to the sequence of characters specified by its arguments.

Parameters
[in]bufpointer to a constant char buffer containing content to be compared. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]posPosition of the first character in the compared string. If this is greater than the string length, it is treated as empty string.
[in]lenLength of compared string (if the string is shorter, as many characters as possible). A value of npos indicates all characters until the end of the string.
[in]countNumber of characters to compare.
Returns
Returns a signed integral indicating the relation between the strings
value relation between compared string and comparing string
0 They compare equal
<0 Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter.
>0 Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer.
Attention
Error is thrown in case
  • pos is greater than the object's length.

◆ compare() [5/5]

virtual int32 APICALL AdobeXMPCommon::IUTF8String_v1::compare ( sizet  pos,
sizet  len,
const spcIUTF8String str,
sizet  strPos = 0,
sizet  strLen = npos 
) const
pure virtual

Compare strings.

Compares the value of the string object (or a substring) to the contents of an string or substring object specified by its arguments.

Parameters
[in]posPosition of the first character in the compared string.
[in]lenLength of compared string (if the string is shorter, as many characters as possible). A value of npos indicates all characters until the end of the string.
[in]strshared pointer to const #AdobeXMPCommon::IUTF8String containing content to be compared. Invalid shared pointer will be treated as empty string.
[in]strPosPosition of the first character in the comparing string.
[in]strLenLength of comparing string (if the string is shorter, as many characters as possible).
Returns
Returns a signed integral indicating the relation between the strings
value relation between compared string and comparing string
0 They compare equal
<0 Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter.
>0 Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer.
Attention
Error is thrown in case
  • strPos is greater than length of str.
  • pos is greater than the object's length.

◆ copy()

virtual sizet APICALL AdobeXMPCommon::IUTF8String_v1::copy ( char *  buf,
sizet  len,
sizet  pos = 0 
) const
pure virtual

Copy sequence of characters from string.

Copies a substring of the current value of the string object into the array. This substring contains the len characters that start at position pos.

Parameters
[in,out]bufPointer to an array of characters. The array shall contain enough storage for the copied characters.
[in]lenNumber of characters to copy (if the string is shorter, as many characters as possible are copied).
[in]posPosition of the first character to be copied.
Returns
The number of characters copied to the array. This may be equal to count or to size() - pos.
Note
The function does not append a null character at the end of the copied content.
Attention
Error is thrown in case
  • pos is greater than the object's length.

◆ CreateUTF8String() [1/2]

static XMP_PRIVATE spIUTF8String AdobeXMPCommon::IUTF8String_v1::CreateUTF8String ( pIObjectFactory  objFactory)
static

Creates an empty IUTF8String object.

Parameters
[in]objFactoryA pointer to #AdobeXMPCommon::IObjectFactory object.
Returns
A shared pointer to an empty IUTF8String object

◆ CreateUTF8String() [2/2]

static XMP_PRIVATE spIUTF8String AdobeXMPCommon::IUTF8String_v1::CreateUTF8String ( pIObjectFactory  objFactory,
const char *  buf,
sizet  count 
)
static

Creates an IUTF8String object whose initial contents are copied from a char buffer.

Parameters
[in]objFactoryA pointer to #AdobeXMPCommon::IObjectFactory object.
[in]bufpointer to a constant char buffer containing content. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]countA value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos.
Returns
A shared pointer to a newly created #AdobeXMPCommon::IUTF8String object

◆ empty()

virtual bool APICALL AdobeXMPCommon::IUTF8String_v1::empty ( ) const
pure virtual

Indicates whether the string object is empty or not.

Returns
A value of type bool; true in case the contents of the string object is empty.

◆ erase()

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::erase ( sizet  pos = 0,
sizet  count = npos 
)
pure virtual

Erases part of the string, reducing its length.

Parameters
[in]posPosition of the first character to be erased. If this is greater than the string length, nothing is erased.
[in]countNumber of characters to erase (if the string is shorter, as many characters as possible are erased). A value of npos indicates all characters until the end of the string.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.
Attention
Error is thrown in case
  • pos is greater than the object's length.

◆ find() [1/3]

virtual sizet APICALL AdobeXMPCommon::IUTF8String_v1::find ( const char *  buf,
sizet  pos,
sizet  count 
) const
pure virtual

Find content in string.

Searches the string for the first occurrence of the sequence specified by its arguments. When pos is specified, the search only includes characters at or after position pos, ignoring any possible occurrences that include characters before pos.

Parameters
[in]bufpointer to a constant char buffer containing content to be matched. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]posPosition of the first character in the string to be considered in the search. If this is greater than the string length, the function never finds matches.
[in]countLength of sequence of characters to match.
Returns
The position of the first character of the first match. If no matches were found, the function returns npos.

◆ find() [2/3]

sizet AdobeXMPCommon::IUTF8String_v1::find ( const char *  buf,
sizet  pos = 0 
) const
inline

Find content in string.

Searches the string for the first occurrence of the sequence specified by its arguments. When pos is specified, the search only includes characters at or after position pos, ignoring any possible occurrences that include characters before pos.

Parameters
[in]bufpointer to a constant char buffer containing content to be matched. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]posPosition of the first character in the string to be considered in the search. If this is greater than the string length, the function never finds matches.
Returns
The position of the first character of the first match. If no matches were found, the function returns npos.

Definition at line 196 of file IUTF8String.h.

196  {
197  return find( buf, pos, npos );
198  }

References AdobeXMPCommon::npos().

◆ find() [3/3]

virtual sizet APICALL AdobeXMPCommon::IUTF8String_v1::find ( const spcIUTF8String src,
sizet  pos = 0,
sizet  count = npos 
) const
pure virtual

Find content in string.

Searches the string for the first occurrence of the sequence specified by its arguments. When pos is specified, the search only includes characters at or after position pos, ignoring any possible occurrences that include characters before pos.

Parameters
[in]srcshared pointer to const #AdobeXMPCommon::IUTF8String containing content to be matched. Invalid shared pointer will be treated as empty string.
[in]posPosition of the first character in the string to be considered in the search. If this is greater than the string length, the function never finds matches.
[in]countLength of sequence of characters to match.
Returns
The position of the first character of the first match. If no matches were found, the function returns npos.

◆ insert() [1/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::insert ( sizet  pos,
const char *  buf,
sizet  count 
)
pure virtual

Inserts additional characters into the string right before the character indicated by pos.

Parameters
[in]posInsertion point: The new contents are inserted before the character at position pos.
[in]bufpointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]countA value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String. \attention Error is thrown in case
  • pos is greater than the object's length.

◆ insert() [2/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::insert ( sizet  pos,
const spcIUTF8String src,
sizet  srcPos = 0,
sizet  count = npos 
)
pure virtual

Inserts additional characters into the string right before the character indicated by pos.

Parameters
[in]posInsertion point: The new contents are inserted before the character at position pos.
[in]srcshared pointer to const #AdobeXMPCommon::IUTF8String whose contents will be copied and pushed into the object. Invalid shared pointer will be treated as empty string.
[in]srcPosA value of #AdobeXMPCommon::sizet indicating the position of the first character in src that is inserted into the object as a substring.
[in]countA value of #AdobeXMPCommon::sizet indicating the length of the substring to be copied (if the string is shorter, as many characters as possible are copied). A value of npos indicates all characters until the end of src. If this is greater than the available characters in the substring then copying is limited to the number of available characters.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.
Attention
Error is thrown in case
  • srcPos is greater than length of src.
  • pos is greater than the object's length.

◆ replace() [1/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::replace ( sizet  pos,
sizet  count,
const char *  buf,
sizet  srcCount 
)
pure virtual

Replace portion of string.

Parameters
[in]posPosition of the first character to be replaced.
[in]countNumber of characters to replace (if the string is shorter, as many characters as possible are replaced). A value of npos indicates all characters until the end of the string.
[in]bufpointer to a constant char buffer containing new content. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]srcCountA value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.
Attention
Error is thrown in case
  • pos is greater than the object's length.

◆ replace() [2/2]

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::replace ( sizet  pos,
sizet  count,
const spcIUTF8String src,
sizet  srcPos = 0,
sizet  srcCount = npos 
)
pure virtual

Replace portion of string.

Parameters
[in]posPosition of the first character to be replaced.
[in]countNumber of characters to replace (if the string is shorter, as many characters as possible are replaced). A value of npos indicates all characters until the end of the string.
[in]srcShared pointer to const #AdobeXMPCommon::IUTF8String whose contents will be copied and pushed into the object. Invalid shared pointer will be treated as empty string.
[in]srcPosPosition of the first character in str that is copied to the object as replacement.
[in]srcCountLength of the substring to be copied (if the string is shorter, as many characters as possible are copied). A value of npos indicates all characters until the end of str.
Returns
The shared pointer to itself of type #AdobeXMPCommon::IUTF8String.
Attention
Error is thrown in case
  • srcPos is greater than length of src.
  • pos is greater than the object's length.

◆ resize()

virtual void APICALL AdobeXMPCommon::IUTF8String_v1::resize ( sizet  n)
pure virtual

Resizes the string to the length of n characters. /param[in] n New string length, expressed in number of characters.

Note
If n is smaller than the current string length, the current value is shortened to its first size character, removing the characters beyond the nth. If n is greater than the current string length, the current content is extended by inserting at the end as many NULL characters as needed to reach a size of n.
Attention
Error is thrown in case
  • n is greater than max_size
  • allocation fails

◆ rfind() [1/3]

virtual sizet APICALL AdobeXMPCommon::IUTF8String_v1::rfind ( const char *  buf,
sizet  pos,
sizet  count 
) const
pure virtual

◆ rfind() [2/3]

sizet AdobeXMPCommon::IUTF8String_v1::rfind ( const char *  buf,
sizet  pos = npos 
) const
inline

Find last occurrence of content in string.

Searches the string for the last occurrence of the sequence specified by its arguments. When pos is specified, the search only includes sequences of characters that begin at or before position pos, ignoring any possible match beginning after pos.

Parameters
[in]bufpointer to a constant char buffer containing content to be matched. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]posPosition of the last character in the string to be considered as the beginning of a match. Any value greater or equal than the string length (including npos) means that the entire string is searched.
Returns
The position of the fist character of the last match. If no matches were found, the function returns npos.

Definition at line 245 of file IUTF8String.h.

245  {
246  return rfind( buf, pos, npos );
247  }

References AdobeXMPCommon::npos().

◆ rfind() [3/3]

virtual sizet APICALL AdobeXMPCommon::IUTF8String_v1::rfind ( const spcIUTF8String src,
sizet  pos = npos,
sizet  count = npos 
) const
pure virtual

Find last occurrence of content in string.

Searches the string for the last occurrence of the sequence specified by its arguments. When pos is specified, the search only includes sequences of characters that begin at or before position pos, ignoring any possible match beginning after pos.

Parameters
[in]srcshared pointer to const #AdobeXMPCommon::IUTF8String containing content to be matched. Invalid shared pointer will be treated as empty string.
[in]posPosition of the last character in the string to be considered as the beginning of a match. Any value greater or equal than the string length (including npos) means that the entire string is searched.
[in]countLength of sequence of characters to match.
Returns
The position of the fist character of the last match. If no matches were found, the function returns npos.

◆ size()

virtual sizet APICALL AdobeXMPCommon::IUTF8String_v1::size ( ) const
pure virtual

Indicates the number of bytes used by the contents of the string object.

Returns
An object of type #AdobeXMPCommon::sizet containing the number of bytes used to store the contents fo the string object.

◆ substr()

virtual spIUTF8String APICALL AdobeXMPCommon::IUTF8String_v1::substr ( sizet  pos = 0,
sizet  count = npos 
) const
pure virtual

Returns a new string object which contains a sub string of the actual string object.

Parameters
[in]posPosition of the first character to be copied. If this is greater than the string length, then nothing is copied.
[in]countNumber of characters to copy (if the string is shorter, as many characters as possible are copied).
Returns
A shared pointer to AdobeXMPCommon::IUTF8String which is exact replica of the current object.
Attention
Error is thrown in case
  • pos is greater than the object's length.
  • allocation fails

The documentation for this class was generated from the following file:
AdobeXMPCommon::IUTF8String_v1::size
virtual sizet APICALL size() const __NOTHROW__=0
Indicates the number of bytes used by the contents of the string object.
AdobeXMPCommon::npos
const sizet npos(kMaxSize)
AdobeXMPCommon::IUTF8String_v1::compare
int32 compare(const char *buf) const
Compare strings.
Definition: IUTF8String.h:285
AdobeXMPCommon::IUTF8String_v1::rfind
sizet rfind(const char *buf, sizet pos=npos) const
Find last occurrence of content in string.
Definition: IUTF8String.h:245
AdobeXMPCommon::IUTF8String_v1::find
sizet find(const char *buf, sizet pos=0) const
Find content in string.
Definition: IUTF8String.h:196