View source code
							
							
						
								Display the source code in std/encoding.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.
							
						Class std.encoding.EncodingScheme
Abstract base class of all encoding schemes
						
				class EncodingScheme
				;
						
					
				Properties
| Name | Type | Description | 
|---|---|---|
| replacementSequence[get] | immutable(ubyte)[] | Returns the sequence of ubytes to be used to represent any character which cannot be represented in the encoding scheme. | 
Methods
| Name | Description | 
|---|---|
| canEncode | Returns true if the character c can be represented in this encoding scheme. | 
| count | Returns the total number of code points encoded in a ubyte array. | 
| create | Obtains a subclass of EncodingScheme which is capable of encoding and decoding the named encoding scheme. | 
| decode | Decodes a single code point. | 
| encode | Encodes a single code point into a user-supplied, fixed-size buffer. | 
| encodedLength | Returns the number of ubytes required to encode this code point. | 
| firstSequence | Returns the length of the first encoded sequence. | 
| index | Returns the array index at which the (n+1)th code point begins. | 
| isValid | Returns true if the array is encoded correctly | 
| names | Returns an array of all known names for this encoding scheme | 
| register | Registers a subclass of EncodingScheme. | 
| safeDecode | Decodes a single code point. The input does not have to be valid. | 
| sanitize | Sanitizes an array by replacing malformed ubyte sequences with valid ubyte sequences. The result is guaranteed to be valid for this encoding scheme. | 
| toString | Returns the standard name of the encoding scheme | 
| validLength | Returns the length of the longest possible substring, starting from the first element, which is validly encoded. | 
| factory | Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor. | 
| opCmp | Compare with another Object obj. | 
| opEquals | Test whether thisis equal too.
 The default implementation only compares by identity (using theisoperator).
 Generally, overrides foropEqualsshould attempt to compare objects by their contents. | 
| toHash | Compute hash function for Object. | 
| toString | Convert Object to a human readable string. | 
Authors
Janice Caron
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.