View source code
							
							
						
								Display the source code in std/uni.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Struct std.uni.Grapheme
A structure designed to effectively pack characters of a grapheme cluster.
						
				struct Grapheme
				;
						
					
				Grapheme has value semantics so 2 copies of a Grapheme
    always refer to distinct objects. In most actual scenarios a Grapheme
    fits on the stack and avoids memory allocation overhead for all but quite
    long clusters.
    
Constructors
| Name | Description | 
|---|---|
| this() | Ctor | 
Properties
| Name | Type | Description | 
|---|---|---|
| length[get] | ulong | Grapheme cluster length in code points. | 
| valid[get] | bool | True if this object contains valid extended grapheme cluster.
        Decoding primitives of this module always return a valid Grapheme. | 
Methods
| Name | Description | 
|---|---|
| opIndex(index) | Gets a code point at the given index in this cluster. | 
| opIndexAssign(ch, index) | Writes a code point chat given index in this cluster. | 
| opOpAssign(ch) | Append character chto this grapheme. | 
| opOpAssign(inp) | Append all characters from the input range inpto this Grapheme. | 
| opSlice(a, b) | Random-access range over Grapheme's characters. | 
See Also
Example
import stdAuthors
Dmitry Olshansky
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.