Class StdBSStrings
Classe utilizada para obter serviços e regras de negócio sobre Strings.
Inheritance
Implements
Inherited Members
Namespace: StdPlatBS100
Assembly: StdPlatBS100.dll
Syntax
[ComVisible(true)]
[Guid("EE0D6B04-D5CA-4C6A-BB3C-F45A62167232")]
[ClassInterface(ClassInterfaceType.None)]
public class StdBSStrings : IStdBSStrings
Methods
CharAnterior(String, Int32)
Devolve o caracter anterior a uma posição indicada, numa string.
Declaration
public string CharAnterior(string strString, int lngPosicao)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.Int32 | lngPosicao | Identificador da posição. |
Returns
Type | Description |
---|---|
System.String |
CharSeguinte(String, Int32)
Devolve o caracter seguinte a uma posição indicada, numa string.
Declaration
public string CharSeguinte(string strString, int lngPosicao)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.Int32 | lngPosicao | Identificador da posição. |
Returns
Type | Description |
---|---|
System.String |
ComecaCom(String, String, Boolean)
Verifica se uma string começa com um caracter indicado.
Declaration
public bool ComecaCom(string strString, string strStringToFind, bool blnCaseSensitive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.String | strStringToFind | Identificador do Caracter a Procurar. |
System.Boolean | blnCaseSensitive | Indicador Case Sensitive. |
Returns
Type | Description |
---|---|
System.Boolean |
ConstroiParStrings(String, String)
Devolve uma string originada através de duas indicadas.([string1].[string2])
Declaration
public string ConstroiParStrings(string strString1, string strString2)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString1 | Identificador da String 1. |
System.String | strString2 | Identificador da String 2. |
Returns
Type | Description |
---|---|
System.String |
Contem(String, String, Boolean)
Verifica se uma string contem a segunda string.
Declaration
public bool Contem(string strString, string strStringToFind, bool blnCaseSensitive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.String | strStringToFind | Identificador da String a ser procurada. |
System.Boolean | blnCaseSensitive | Indica se a comparação deve ser Case Sensitive |
Returns
Type | Description |
---|---|
System.Boolean |
ContemCaracteresReservados(String)
Declaration
public bool ContemCaracteresReservados(string strString)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString |
Returns
Type | Description |
---|---|
System.Boolean |
ContemCaracteresReservados(String, String)
Declaration
public bool ContemCaracteresReservados(string strString, string strNomeStringTestar)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | |
System.String | strNomeStringTestar |
Returns
Type | Description |
---|---|
System.Boolean |
ContemCaracteresReservados(String, String, ref String)
Contém caracteres reservados
Declaration
public bool ContemCaracteresReservados(string strString, string strNomeStringTestar, ref string strErro)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Valor. |
System.String | strNomeStringTestar | Valor a testar. |
System.String | strErro | Erro. |
Returns
Type | Description |
---|---|
System.Boolean |
Diferentes(String, String, Boolean)
Verifica se duas strings indicadas são diferentes.
Declaration
public bool Diferentes(string strString1, string strString2, bool blnCaseSensitive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString1 | Identificador da Primeira String. |
System.String | strString2 | Identificador da Segunda String. |
System.Boolean | blnCaseSensitive | Indica se a comparação deve ser Case Sensitive |
Returns
Type | Description |
---|---|
System.Boolean |
Finalize()
Declaration
protected void Finalize()
Formata(String, Object[])
Formata uma string.
Declaration
public string Formata(string strString, params object[] arrParams)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da string. |
System.Object[] | arrParams | Identificador de uma colecção de parametros. |
Returns
Type | Description |
---|---|
System.String |
Iguais(String, String, Boolean)
Verifica se duas strings indicadas são iguais.
Declaration
public bool Iguais(string strString1, string strString2, bool blnCaseSensitive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString1 | Identificador da Primeira String. |
System.String | strString2 | Identificador da Segunda String. |
System.Boolean | blnCaseSensitive | Indica se a comparação deve ser Case Sensitive |
Returns
Type | Description |
---|---|
System.Boolean |
NumeroOcorrencias(String, String, Boolean)
Devolve o número de ocorrencias de uma string, numa outra string.
Declaration
public int NumeroOcorrencias(string strString, string strStringToFind, bool blnCaseSensitive = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.String | strStringToFind | Identificador da String a Procurar. |
System.Boolean | blnCaseSensitive | Indica se a comparação deve ser Case Sensitive |
Returns
Type | Description |
---|---|
System.Int32 |
Parse(String, String, Boolean)
Devolve uma colecção de strings a partir de uma string inicial indicando um delimitador.
Declaration
public string[] Parse(string strString, string strDelimiter, bool blnRemoveSpaces = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.String | strDelimiter | Identificador do delimitador. |
System.Boolean | blnRemoveSpaces | Indica se os espaços devem ser removidos. |
Returns
Type | Description |
---|---|
System.String[] |
ParteParStrings(String, ref String, ref String)
Indica se é possivél separar duas strings indicavas usando determinadas regras.
Declaration
public bool ParteParStrings(string strValor, ref string strString1, ref string strString2)
Parameters
Type | Name | Description |
---|---|---|
System.String | strValor | indicador da String a separar. |
System.String | strString1 | Indicador da String de resultado 1. |
System.String | strString2 | Indicador da String de resultado 2. |
Returns
Type | Description |
---|---|
System.Boolean |
RemoveCaracteres(String, String)
Remove os caracteres indicados de uma string.
Declaration
public string RemoveCaracteres(string strString, string strCaracteresRemover)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.String | strCaracteresRemover | Identificador dos caracteres a Remover. |
Returns
Type | Description |
---|---|
System.String |
RemoverDiacriticos(String)
Remove os diacríticos de uma string.
Declaration
public string RemoverDiacriticos(string strString)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | String da qual se pretende remover os diacríticos. |
Returns
Type | Description |
---|---|
System.String |
StringArrayContem(String, String[])
Verifica se um array de strings contem uma string.
Declaration
public bool StringArrayContem(string strString, string[] strArray)
Parameters
Type | Name | Description |
---|---|---|
System.String | strString | Identificador da String. |
System.String[] | strArray | Identificador da String. |
Returns
Type | Description |
---|---|
System.Boolean |
Substitui(String, String, String, Boolean)
Substitui determinado texto na string original.
Declaration
public string Substitui(string strOriginal, string strProcurar, string strSubstituir, bool blnCaseSensitive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | strOriginal | Identificador da String Original. |
System.String | strProcurar | Identificador da String a Procurar. |
System.String | strSubstituir | Identificador da String a Substituir. |
System.Boolean | blnCaseSensitive | Indica se é Case Sensitive. |
Returns
Type | Description |
---|---|
System.String |