pub fn into_strict(mut self) -> Self {
        if !self.0.iter().any(|e| match e { TOSECToken::Date(_, _, _) => true, _ => false })
        {
            self.0.push(TOSECToken::Date("19xx", None, None));
        }

        if !self.0.iter().any(|e| match e { TOSECToken::Publisher(_) => true, _ => false })
        {
            self.0.push(TOSECToken::Publisher(None));
        }

        self.0.sort();
        TOSECName(self.0.into_iter()
            .filter_map(|t| match t {
                TOSECToken::Publisher(Some(mut publishers)) => {
                    publishers.sort();
                    Some(TOSECToken::Publisher(Some(publishers)))
                }
                TOSECToken::Date("19XX", m, d) =>
                    Some(TOSECToken::Date("19xx", m, d)),
                TOSECToken::Development("Alpha") => Some(TOSECToken::Development("alpha")),
                TOSECToken::Development("Beta") => Some(TOSECToken::Development("beta")),
                TOSECToken::Development("Preview") => Some(TOSECToken::Development("preview")),
                TOSECToken::Development("Pre-Release") => Some(TOSECToken::Development("pre-release")),
                TOSECToken::Development("Proto")
                    |  TOSECToken::Development("Prototype") => Some(TOSECToken::Development("proto")),
                TOSECToken::Region(_, regions) => {
                    // Convert GoodTools region into TOSEC regions.
                    // The lifetime of the region strings change from 'a to 'static.

                    let region_str = regions
                        .iter()
                        .map(|r| r.into())
                        .collect::<Vec<&str>>();
                    Some(TOSECToken::Region(region_str, regions))
                }
                TOSECToken::Warning(_) => None,
                _ => Some(t)
            })
            .collect())
    }
/// Makes the name conform strictly to the TOSEC naming conventions.
///
/// This removes any warning tokens and ensures the order of flags is proper.
///
/// # Fixes
/// - If there is no date, 19xx is added as the date.
/// - If there is no publisher, the unknown publisher (-) is added.
/// - GoodTools region codes are converted into the ISO equivalent.
/// - Publishers are sorted lexicographically.
/// - Tags are put in the order
///    ```order
///   Title version (demo) (date)(publisher)(system)(video)(country)(language)
///   (copyright status)(development status)(media type)(media label)
///   [cr][f][h][m][p][t][tr][o][u][v][b][a][!][more info]
///   ```
/// - The date '19XX' is changed into '19xx'.
/// - Uppercased development tags are lowercased.
///
/// # Zero-copy guarantee
///
/// This method consumes the tokenized name and remains zero-copy.
/// The zero-copy nature of the parsed tokens mean that some fixes can not be done, such
/// as reorganizing individual publisher names into `Surname, Given Name` format.
///
/// As a result, the strict name may not always conform to the strictest reading of the
/// TOSEC naming convention, especially with regards to alphabetization or malformed
/// flags that were not explicitly specified in listed fixes.
///
/// The fixes that are done are only possible by converting the tokenized `&'a str` into
/// a known `&'static str`.
Makes the name conform strictly to the TOSEC naming conventions.
This removes any warning tokens and ensures the order of flags is proper.
Makes the name conform strictly to the TOSEC naming conventions . This removes any warning tokens and ensures the order of flags is proper .
pub fn into_strict(mut self) -> Self {
        if !self.0.iter().any(|e| match e { TOSECToken::Date(_, _, _) => true, _ => false })
        {
            self.0.push(TOSECToken::Date("19xx", None, None));
        }
        if !self.0.iter().any(|e| match e { TOSECToken::Publisher(_) => true, _ => false })
        {
            self.0.push(TOSECToken::Publisher(None));
        }
        self.0.sort();
        TOSECName(self.0.into_iter()
            .filter_map(|t| match t {
                TOSECToken::Publisher(Some(mut publishers)) => {
                    publishers.sort();
                    Some(TOSECToken::Publisher(Some(publishers)))
                }
                TOSECToken::Date("19XX", m, d) =>
                    Some(TOSECToken::Date("19xx", m, d)),
                TOSECToken::Development("Alpha") => Some(TOSECToken::Development("alpha")),
                TOSECToken::Development("Beta") => Some(TOSECToken::Development("beta")),
                TOSECToken::Development("Preview") => Some(TOSECToken::Development("preview")),
                TOSECToken::Development("Pre-Release") => Some(TOSECToken::Development("pre-release")),
                TOSECToken::Development("Proto")
                    |  TOSECToken::Development("Prototype") => Some(TOSECToken::Development("proto")),
                TOSECToken::Region(_, regions) => {
                    // Convert GoodTools region into TOSEC regions.
                    // The lifetime of the region strings change from 'a to 'static.
                    let region_str = regions
                        .iter()
                        .map(|r| r.into())
                        .collect::<Vec<&str>>();
                    Some(TOSECToken::Region(region_str, regions))
                }
                TOSECToken::Warning(_) => None,
                _ => Some(t)
            })
            .collect())
    }
pub fn into_strict ( mut self ) -> Self { if ! self . 0 . iter ( ) . any ( | e | match e { TOSECToken :: Date ( _ , _ , _ ) => true , _ => false } ) { self . 0 . push ( TOSECToken :: Date ( " " , None , None ) ) ; } if ! self . 0 . iter ( ) . any ( | e | match e { TOSECToken :: Publisher ( _ ) => true , _ => false } ) { self . 0 . push ( TOSECToken :: Publisher ( None ) ) ; } self . 0 . sort ( ) ; TOSECName ( self . 0 . into_iter ( ) . filter_map ( | t | match t { TOSECToken :: Publisher ( Some ( mut publishers ) ) => { publishers . sort ( ) ; Some ( TOSECToken :: Publisher ( Some ( publishers ) ) ) } TOSECToken :: Date ( " " , m , d ) => Some ( TOSECToken :: Date ( " " , m , d ) ) , TOSECToken :: Development ( " " ) => Some ( TOSECToken :: Development ( " " ) ) , TOSECToken :: Development ( " " ) => Some ( TOSECToken :: Development ( " " ) ) , TOSECToken :: Development ( " " ) => Some ( TOSECToken :: Development ( " " ) ) , TOSECToken :: Development ( " " ) => Some ( TOSECToken :: Development ( " " ) ) , TOSECToken :: Development ( " " ) | TOSECToken :: Development ( " " ) => Some ( TOSECToken :: Development ( " " ) ) , TOSECToken :: Region ( _ , regions ) => { // Convert GoodTools region into TOSEC regions. // The lifetime of the region strings change from 'a to 'static. let region_str = regions . iter ( ) . map ( | r | r . into ( ) ) . collect :: < Vec < & str > > ( ) ; Some ( TOSECToken :: Region ( region_str , regions ) ) } TOSECToken :: Warning ( _ ) => None , _ => Some ( t ) } ) . collect ( ) ) }
Makes the name conform strictly to the TOSEC naming conventions.
Makes the name conform strictly to the TOSEC naming conventions .
mut self
fixes
If there is no date, 19xx is added as the date.
If there is no publisher, the unknown publisher (-) is added.
GoodTools region codes are converted into the ISO equivalent.
Publishers are sorted lexicographically.
Tags are put in the order
```order
Title version (demo) (date)(publisher)(system)(video)(country)(language)
(copyright status)(development status)(media type)(media label)
[cr][f][h][m][p][t][tr][o][u][v][b][a][!][more info]
```
The date '19XX' is changed into '19xx'.
Uppercased development tags are lowercased.
If there is no date 19xx is added as the date . If there is no publisher the unknown publisher ( - ) is added . GoodTools region codes are converted into the ISO equivalent . Publishers are sorted lexicographically . Tags are put in the order ` ` ` order Title version ( demo ) ( date ) ( publisher ) ( system ) ( video ) ( country ) ( language ) ( copyright status ) ( development status ) ( media type ) ( media label ) [ cr ] [ f ] [ h ] [ m ] [ p ] [ t ] [ tr ] [ o ] [ u ] [ v ] [ b ] [ a ] [ ! ] [ more info ] ` ` ` The date ' 19XX ' is changed into ' 19xx ' . Uppercased development tags are lowercased .
zero-copy guarantee
This method consumes the tokenized name and remains zero-copy.
The zero-copy nature of the parsed tokens mean that some fixes can not be done, such
as reorganizing individual publisher names into `Surname, Given Name` format.

As a result, the strict name may not always conform to the strictest reading of the
TOSEC naming convention, especially with regards to alphabetization or malformed
flags that were not explicitly specified in listed fixes.

The fixes that are done are only possible by converting the tokenized `&'a str` into
a known `&'static str`.
This method consumes the tokenized name and remains zero - copy . The zero - copy nature of the parsed tokens mean that some fixes can not be done such as reorganizing individual publisher names into ` Surname Given Name ` format . As a result the strict name may not always conform to the strictest reading of the TOSEC naming convention especially with regards to alphabetization or malformed flags that were not explicitly specified in listed fixes . The fixes that are done are only possible by converting the tokenized ` & ' a str ` into a known ` & ' static str ` .