~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/functions/string/length.rst

  • Committer: Daniel Nichter
  • Date: 2011-08-13 20:41:38 UTC
  • mto: This revision was merged to the branch mainline in revision 2413.
  • Revision ID: daniel@percona.com-20110813204138-stxa89ca1t7cg1uy
Skeleton documentation for all plugins, more complete docu for first half of plugins.
Clean up plugin.ini titles and descriptions.
Reformat and reorganize root index.
Change Administrative to Administration and remove empty files (logging, etc.)
Add, fix, and tag documentation for functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Length and Size Functions
2
2
=========================
3
3
 
 
4
.. _bit-lenght-function:
 
5
 
4
6
BIT_LENGTH
5
7
----------
6
8
The BIT_LENGTH(str) function return the String str length in bits. Here are the some example of the BIT_LENGTH(str) function: 
12
14
 
13
15
Returns 8
14
16
 
 
17
.. _char-length-function:
 
18
 
15
19
CHAR_LENGTH
16
20
-----------
17
21
The CHAR_LENGTH(str) function returns string length measured in characters. 
22
26
 
23
27
This function is same as CHAR_LENGTH().
24
28
 
25
 
 
26
 
LENGTH()
27
 
--------
 
29
.. _character-length-function:
 
30
 
 
31
CHARACTER_LENGTH
 
32
----------------
 
33
 
 
34
Synonym for CHAR_LENGTH.
 
35
 
 
36
.. _length-function:
 
37
 
 
38
LENGTH
 
39
------
28
40
 
29
41
The LENGTH function returns the length of the string argument in bytes. A multi-byte character counts as multiple bytes. This means that for a string containing a three-byte character, LENGTH() returns 3, whereas CHAR_LENGTH() returns 1. For example:
30
42
 
36
48
 
37
49
The is because the Euro sign is encoded as 0xE282AC in UTF-8 and thereby occupies 3 bytes.
38
50
 
39
 
OCTET_LENGTH()
40
 
---------------
41
 
 
42
 
A synonym for LENGTH()
 
51
.. _octet-length-function:
 
52
 
 
53
OCTET_LENGTH
 
54
-------------
 
55
 
 
56
A synonym for LENGTH().