Symbian3/SDK/Source/GUID-FD273259-2282-5353-847D-853D483C37BC.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-FD273259-2282-5353-847D-853D483C37BC" xml:lang="en"><title>Using
       
    13 TDesC8 Class</title><shortdesc>Use TDescC8 for interfaces which takes binary data or explicit
       
    14 narrow text, regardless of the build variant, but which does not need to change
       
    15 the data. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    16 <section id="GUID-F1F7E9F9-0B79-5F45-9C67-587A74BBE209"><title>Using in a
       
    17 function interface</title> <p>Interfaces which take binary data or narrow
       
    18 text, use descriptors in the specification of that interface. All 8 bit concrete
       
    19 descriptors are derived from <codeph>TDesC8</codeph> which means that the
       
    20 interface can accept any 8 bit descriptor.</p> <p>The following code fragment
       
    21 shows the most common function prototype pattern.</p> <codeblock id="GUID-2679659B-7A39-5C43-8B18-878BDE54AD3E" xml:space="preserve">void ClassX::foo(const TDesC8&amp; anArg);</codeblock> <p>The use of <codeph>TDesC8</codeph> ensures that the data cannot be modified
       
    22 through the descriptor; <codeph>const</codeph> is an extra guarantee that
       
    23 the data cannot be changed.</p> <p>In practice, nearly all code uses the build
       
    24 independent variant, <codeph>TDesC</codeph>, unless an explicit 8 bit or 16
       
    25 bit build variant is required.</p> </section>
       
    26 <section id="GUID-2342D6CC-9781-5353-A2D4-EBA6FAC6E0E2"><title>Extract leftmost
       
    27 part of data</title> <p>The code fragment shows how the leftmost part of data
       
    28 in a descriptor can be accessed, using the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-0593A69B-B19A-3D2C-861A-216892E60180"><apiname>TDesC8::Left()</apiname></xref> member
       
    29 function.</p> <p>The behaviour is the same for the build independent variant, <xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>,
       
    30 replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with <xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref> and <xref href="GUID-6DF731E4-5691-31C4-BEE0-03A3873F15EC.dita"><apiname>TPtrC8</apiname></xref> with <xref href="GUID-5CD07A27-E3ED-3273-A560-680501468C91.dita"><apiname>TPtrC</apiname></xref>.</p> <codeblock id="GUID-2707349F-04BD-59BC-8639-4794F506AFD0" xml:space="preserve">_LIT8(KData,"abcdefg");
       
    31 TBufC8&lt;8&gt; str(KData);
       
    32 ...
       
    33 str.Left(4);</codeblock> <p>The call to <codeph>Left()</codeph> returns a
       
    34 non-modifiable pointer descriptor representing the data string "<codeph>abcd</codeph>";
       
    35 this has length 4. The original data contained in, and represented by, the
       
    36 non-modifiable buffer descriptor <codeph>str</codeph>, is not changed in any
       
    37 way.</p> <codeblock id="GUID-13D0C4D6-1534-56AF-B32E-4DB886555C69" xml:space="preserve">_LIT8(KData,"abcdefg");
       
    38 TBufC8&lt;8&gt; str(KData);
       
    39 ...
       
    40 str.Left(256);</codeblock> <p>This call to <codeph>Left()</codeph> returns
       
    41 a non-modifiable pointer descriptor representing the data string "<codeph>abcdefg</codeph>",
       
    42 i.e. the whole content of the descriptor <codeph>str</codeph>; this has length
       
    43 7.</p> <p>Note that the following call to <codeph>Left()</codeph> results
       
    44 in a panic.</p> <codeblock id="GUID-1C8BAE4F-E649-5950-BD1C-2C7ED471B443" xml:space="preserve">_LIT8(KData,"abcdefg");
       
    45 TBufC8&lt;8&gt; str(KData);
       
    46 ...
       
    47 str.Left(-1);           // Panic !</codeblock> </section>
       
    48 <section id="GUID-1842A134-AFBF-5282-8052-424C7BF66963"><title>Extract rightmost
       
    49 part of data</title> <p>The code fragment shows how the rightmost part of
       
    50 data in a descriptor can be accessed, using the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-4113AD10-171C-38C0-B3B5-93FF0BFCBBC5"><apiname>TDesC8::Right()</apiname></xref> member
       
    51 function.</p> <p>The behaviour is the same for the build independent variant, <xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>,
       
    52 replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with <xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref> and <xref href="GUID-6DF731E4-5691-31C4-BEE0-03A3873F15EC.dita"><apiname>TPtrC8</apiname></xref> with <xref href="GUID-5CD07A27-E3ED-3273-A560-680501468C91.dita"><apiname>TPtrC</apiname></xref>.</p> <codeblock id="GUID-146EBCF8-AE0A-52BD-AC1D-25A61B223AE6" xml:space="preserve">_LIT8(KData,"abcdefg");
       
    53 TBufC8&lt;8&gt; str(KData);
       
    54 ...
       
    55 str.Right(4);</codeblock> <p>The call to <codeph>Right()</codeph> returns
       
    56 a non-modifiable pointer descriptor representing the data string "<codeph>defg</codeph>";
       
    57 this has length 4. The original data contained in, and represented by, the
       
    58 non-modifiable buffer descriptor <codeph>str</codeph>, is not changed in any
       
    59 way.</p> <codeblock id="GUID-79443C9B-FBE6-5B2F-B1BB-9610D6CB90A5" xml:space="preserve">_LIT8(KData,"abcdefg");
       
    60 TBufC8&lt;8&gt; str(KData);
       
    61 ...
       
    62 str.Right(256);</codeblock> <p>This call to <codeph>Right()</codeph> returns
       
    63 a non-modifiable pointer descriptor representing the data string "<codeph>abcdefg</codeph>",
       
    64 i.e. the whole content of the descriptor <codeph>str</codeph>; this has length
       
    65 7.</p> <p>Note that the following call to <codeph>Right()</codeph> results
       
    66 in a panic.</p> <codeblock id="GUID-D9BF00DD-87BB-5125-B8F0-35B28D6E6E14" xml:space="preserve">_LIT8(KData,"abcdefg");
       
    67 TBufC8&lt;8&gt; str(KData);
       
    68 ...
       
    69 str.Right(-1);          // Panic !</codeblock> </section>
       
    70 <section id="GUID-C72FC6C5-5D89-5797-B1E1-F8BD913F1CC7"><title>Extract middle
       
    71 portion of the data</title> <p>The code fragment shows how a portion of data
       
    72 within a descriptor can be accessed, using the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-E02A80AB-4479-376A-82FC-099BA20F6A01"><apiname>TDesC8::Mid()</apiname></xref> member
       
    73 function. Each call to<codeph>Mid()</codeph> returns a non-modifiable pointer
       
    74 descriptor representing the selected portions of data.</p> <p>The behaviour
       
    75 is the same for the build independent variant,<xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>, replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with<xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref> and <xref href="GUID-6DF731E4-5691-31C4-BEE0-03A3873F15EC.dita"><apiname>TPtrC8</apiname></xref> with<xref href="GUID-5CD07A27-E3ED-3273-A560-680501468C91.dita"><apiname>TPtrC</apiname></xref>.</p> <codeblock id="GUID-80455C29-5126-5C80-8DCC-8135AC7A23E2" xml:space="preserve">_LIT8(KData,"abcdefg");
       
    76 TBufC8 str(KData);
       
    77 ...
       
    78 str.Mid(0);   //returns TPtrC8 representing "abcdefg";  length is 7
       
    79 str.Mid(1);   //returns TPtrC8 representing "bcdefg";   length is 6
       
    80 str.Mid(6);   //returns TPtrC8 representing "g";        length is 1
       
    81 str.Mid(3,3); //returns TPtrC8 representing "def";      length is 3
       
    82 str.Mid(0,7); //returns TPtrC8 representing "abcdefg";  length is 7
       
    83 ...
       
    84 str.Mid(8);   // Panics !
       
    85 str.Mid(3,5); // Panics !</codeblock> </section>
       
    86 <section id="GUID-884F8704-067A-5DF2-9FCE-7AC6FC8A2CD2"><title>Comparing data</title> <p>This
       
    87 code fragment shows the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-1C79CC6C-9C60-3C91-84C0-84363B5A7B70"><apiname>TDesC8::Compare()</apiname></xref> function.</p> <p>The
       
    88 behaviour is the same for the build independent variant,<xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>,
       
    89 replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with<xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref>.</p> <codeblock id="GUID-E09FF7E7-8954-516E-AC1F-00F1B0675D19" xml:space="preserve">_LIT8(Kabcd,  "abcd");
       
    90 _LIT8(Kabcde, "abcde");
       
    91 _LIT8(Kabc,   "abc");
       
    92 _LIT8(Kabcx,  "abcx");
       
    93 ...
       
    94 TBufC8&lt;8&gt; str(Kabcd);
       
    95 ...
       
    96 str.Compare(Kabcde);    // returns -ve
       
    97 str.Compare(Kabc);      // returns +ve
       
    98 str.Compare(Kabcd);     // returns zero
       
    99 str.Compare(Kabcx);     // returns -ve</codeblock> <p>This result of the comparison
       
   100 means that:</p> <ul>
       
   101 <li id="GUID-CE717629-1A33-5C6F-BBC0-F69B86297D8F"><p>"abcd" is less than
       
   102 "abcde".</p> </li>
       
   103 <li id="GUID-22640DC7-3446-5310-AC92-9E04ACE2B8BF"><p>"abcd" is greater than
       
   104 "abc".</p> </li>
       
   105 <li id="GUID-4A5A34DB-9B24-5F9B-A4CF-B07D5D93DDF0"><p>"abcd" is equal to "abcd".</p> </li>
       
   106 <li id="GUID-71EF4AC1-8C0B-5A4A-8484-DBD6D0551A6C"><p>"abcd" is less than
       
   107 "abcx".</p> </li>
       
   108 </ul> </section>
       
   109 <section id="GUID-F8DC34F6-C155-5085-9E76-2135603A802B"><title>Locating a
       
   110 character</title> <p>This code fragment shows the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-2D247FCC-C975-39C4-947F-A1E89C273033"><apiname>TDesC8::Locate()</apiname></xref> function.</p> <p>The
       
   111 behaviour is the same for the build independent variant,<xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>,
       
   112 replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with<xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref>.</p> <codeblock id="GUID-A03FF85A-2A87-5DE3-81B9-BF1FB050CF1F" xml:space="preserve">_LIT8(Kabcd,"abcd");
       
   113 TBufC8&lt;8&gt; str(Kabcd);
       
   114 ...
       
   115 str.Locate('d');   // returns 3
       
   116 str.Locate('a');   // returns 0
       
   117 str.Locate('b');   // returns 1
       
   118 str.Locate('x');   // returns KErrNotFound</codeblock> </section>
       
   119 <section id="GUID-F7BEE7D3-AF21-5774-BFC1-97C8CFFE08ED"><title>Finding data</title> <p>This
       
   120 code fragment shows the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-1D939364-6C89-3CAA-BC0D-2F20BFBCF725"><apiname>TDesC8::Find()</apiname></xref> function.</p> <p>The
       
   121 behaviour is the same for the build independent variant,<xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>,
       
   122 replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with<xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref>.</p> <codeblock id="GUID-94D64D41-0247-57AD-85D7-08B91686602A" xml:space="preserve">_LIT8(KAtoZ,"abcdefghijklmnopqrstuvwxyz");
       
   123 TBufC8&lt;32&gt; str(KAtoZ);
       
   124 ...
       
   125 _LIT8(KFind1,"abc");
       
   126 str.Find(KFind1);            // returns 0
       
   127 
       
   128 _LIT8(KFInd2,"bcde");
       
   129 str.Find(KFInd2);            // returns 1
       
   130 
       
   131 _LIT8(KFind3,"uvwxyz");
       
   132 str.Find(KFind3);            // returns 20
       
   133 
       
   134 _LIT8(KFind4,"0123");
       
   135 str.Find(KFind4);            // returns KErrNotFound
       
   136 
       
   137 _LIT8(KFind5,"abcdefghijklmnopqrstuvwxyz01");
       
   138 str.Find(KFind5);            // returns KErrNotFound
       
   139 
       
   140 str.Find(KNullDesC8);        // returns 0</codeblock> </section>
       
   141 <section id="GUID-D192C3B7-1418-55BE-B70D-143D3FDD82DB"><title>Pattern matching</title> <p>This
       
   142 code fragment shows the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-9BCB8339-2937-362D-85FF-3E5AE3A2CAFD"><apiname>TDesC8::Match()</apiname></xref> function.</p> <p>The
       
   143 behaviour is the same for the build independent variant,<xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>,
       
   144 replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with<xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref>.</p> <codeblock id="GUID-9B7216C7-F4BD-551F-895B-A8D6D9F8CC28" xml:space="preserve">_LIT8(KAtoZ,"abcdefghijklmnopqrstuvwxyz");
       
   145 TBufC8&lt;32&gt; str(KAtoZ);
       
   146     ...
       
   147 _LIT8(KMatch1,"*ijk*");
       
   148 str.Match(KMatch1);          //returns -&gt; 8
       
   149 
       
   150 _LIT8(KMatch2,"*i?k*");
       
   151 str.Match(KMatch2);          //        -&gt; 8
       
   152 
       
   153 _LIT8(KMatch3,"ijk*");
       
   154 str.Match(KMatch3);          //        -&gt; KErrNotFound
       
   155 
       
   156 _LIT8(KMatch4,"abcd");
       
   157 str.Match(KMatch4);          //        -&gt; KErrNotFound
       
   158 
       
   159 _LIT8(KMatch5,"*i*mn*");
       
   160 str.Match(KMatch5);          //        -&gt; 8
       
   161 
       
   162 _LIT8(KMatch6,"abcdef*");
       
   163 str.Match(KMatch6);          //        -&gt; 0
       
   164 
       
   165 _LIT8(KMatch7,"*");
       
   166 str.Match(KMatch7);          //        -&gt; 0
       
   167 
       
   168 _LIT8(KMatch8,"*y*");
       
   169 str.Match(KMatch8);          //        -&gt; 24
       
   170 
       
   171 _lit8(KMatch9,"*i??k*");
       
   172 str.Match(KMatch9);          //        -&gt; KErrNotFound</codeblock> <p>To test
       
   173 for the existence of a pattern within a text string, the pattern must start
       
   174 and end with an '<codeph>*</codeph>'.</p> </section>
       
   175 <section id="GUID-B53507BB-D45B-5440-A025-B9690E15FACD"><title>Referencing
       
   176 a data item</title> <p>The code fragment shows how a data item can be referenced
       
   177 using<codeph>operator[]()</codeph>.</p> <p>The behaviour is the same for the
       
   178 build independent variant,<xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>, replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with<xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref>.</p> <codeblock id="GUID-8C4F4C8F-303F-5690-949B-851EF3BB52DE" xml:space="preserve">_LIT8(KData,"abcdefg");
       
   179 TBufC8&lt;8&gt; str(KData);
       
   180 ...
       
   181 str[0];                 // returns reference to 'a'
       
   182 str[3];                 // returns reference to 'd'
       
   183 str[7];                 // Panics !!</codeblock> </section>
       
   184 <section id="GUID-83CFA0F7-A209-5E69-BE6B-4D5B17626202"><title>Creating a
       
   185 heap descriptor</title> <p>The code fragments show how a heap descriptor is
       
   186 created from an existing descriptor using the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita#GUID-FB97E0A3-352A-316F-97C6-69E4741A8120/GUID-E6A17C44-EADD-3224-A16A-96263F16D004"><apiname>TDesC8::AllocL()</apiname></xref> member
       
   187 function.</p> <p>The behaviour is the same for the build independent variant,<xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>,
       
   188 replacing <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> with <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref>, <xref href="GUID-5B1CA2E7-E3A7-3AF8-9EB0-662E130C45DA.dita"><apiname>TBufC8</apiname></xref> with<xref href="GUID-4D64E4B7-6BEE-3900-A115-460FE5B2D79E.dita"><apiname>TBufC</apiname></xref>,
       
   189 and<xref href="GUID-2A528453-0279-3E47-838C-F8A8D29B88F1.dita"><apiname>HBufC8</apiname></xref> with<xref href="GUID-A103FB19-60B3-3E45-97A5-1F295934ACA1.dita"><apiname>HBufC</apiname></xref>.</p> <codeblock id="GUID-6AF24F59-9224-59F0-84A2-9766EAFBCF79" xml:space="preserve">_LIT8(KData,"abcdefg");
       
   190 TBufC8&lt;16&gt; str(KData);
       
   191 ...
       
   192 HBufC8* ptr;
       
   193 ...
       
   194 ptr = str.AllocL();     //Creates and returns address of
       
   195 ...                     //heap descriptor. The new heap descriptor
       
   196 ...                     //contains a copy of the original data.
       
   197 ptr-&gt;Length();           //Returns 7; the length of "abcdfeg"</codeblock> </section>
       
   198 </conbody><related-links>
       
   199 <link href="GUID-7830BAAB-40DD-5E55-84B5-8DCA888E68E7.dita#GUID-7830BAAB-40DD-5E55-84B5-8DCA888E68E7/GUID-235E272D-6F5A-5740-8150-9698C8C8D55D">
       
   200 <linktext>Using TDesC                   in a function interface</linktext>
       
   201 </link>
       
   202 </related-links></concept>