~vjsamuel/drizzle/fix-bug-850898

« back to all changes in this revision

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

  • Committer: Mark Atwood
  • Date: 2011-09-13 19:54:55 UTC
  • mfrom: (2397.1.3 plugin-docs)
  • Revision ID: me@mark.atwood.name-20110913195455-3bk3locm85m4jimp
merge lp:~daniel-nichter/drizzle/plugin-docs

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().