pub fn to_bytes( self, w2b: &HashMap < WidthOffset, ByteOffset > ) -> ByteOffset
	{
		let mut found = ByteOffset( 0 );
		let mut try   = self;

		loop
		{
			if w2b.contains_key( &try )
			{
				found = w2b[ &try ];
				break;
			}

			else if try.0 > 1
			{
				try = try - 1;
			}

			else { break }
		}

		found
	}
// Returns the ByteOffset of the string up until this width. If it falls within a grapheme cluster, the beginning
// of the containing cluster is returned (yes, some clusters have a width of several columns).
//
Returns the ByteOffset of the string up until this width. If it falls within a grapheme cluster, the beginning
of the containing cluster is returned (yes, some clusters have a width of several columns).
Returns the ByteOffset of the string up until this width . If it falls within a grapheme cluster the beginning of the containing cluster is returned ( yes some clusters have a width of several columns ) .
pub fn to_bytes( self, w2b: &HashMap < WidthOffset, ByteOffset > ) -> ByteOffset
	{
		let mut found = ByteOffset( 0 );
		let mut try   = self;
		loop
		{
			if w2b.contains_key( &try )
			{
				found = w2b[ &try ];
				break;
			}
			else if try.0 > 1
			{
				try = try - 1;
			}
			else { break }
		}
		found
	}
pub fn to_bytes ( self , w2b : & HashMap < WidthOffset , ByteOffset > ) -> ByteOffset { let mut found = ByteOffset ( 0 ) ; let mut try = self ; loop { if w2b . contains_key ( & try ) { found = w2b [ & try ] ; break ; } else if try . 0 > 1 { try = try - 1 ; } else { break } } found }
Returns the ByteOffset of the string up until this width.
Returns the ByteOffset of the string up until this width .
self
w2b
&HashMap < WidthOffset, ByteOffset >
self
w2b
&HashMap < WidthOffset, ByteOffset >