gitlab.com/evatix-go/core@v1.3.55/corecomparator/BaseIsIgnoreCase.go (about)

     1  package corecomparator
     2  
     3  type BaseIsIgnoreCase struct {
     4  	IsIgnoreCase bool `json:"IsCaseSensitive,omitempty"` // ignore case compare
     5  }
     6  
     7  func (it *BaseIsIgnoreCase) IsCaseSensitive() bool {
     8  	return !it.IsIgnoreCase
     9  }
    10  
    11  func (it *BaseIsIgnoreCase) BaseIsCaseSensitive() BaseIsCaseSensitive {
    12  	return BaseIsCaseSensitive{
    13  		IsCaseSensitive: it.IsCaseSensitive(),
    14  	}
    15  }
    16  
    17  func (it BaseIsIgnoreCase) Clone() BaseIsIgnoreCase {
    18  	return BaseIsIgnoreCase{
    19  		IsIgnoreCase: it.IsIgnoreCase,
    20  	}
    21  }
    22  
    23  func (it *BaseIsIgnoreCase) ClonePtr() *BaseIsIgnoreCase {
    24  	if it == nil {
    25  		return nil
    26  	}
    27  
    28  	return &BaseIsIgnoreCase{
    29  		IsIgnoreCase: it.IsIgnoreCase,
    30  	}
    31  }