Char.IsPunctuation Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Indica se un carattere Unicode è categorizzato come segno di punteggiatura.
Overload
| Nome | Descrizione |
|---|---|
| IsPunctuation(Char) |
Indica se il carattere Unicode specificato è categorizzato come segno di punteggiatura. |
| IsPunctuation(String, Int32) |
Indica se il carattere in corrispondenza della posizione specificata in una stringa specificata è categorizzato come segno di punteggiatura. |
Esempio
Nell'esempio di codice seguente viene IsPunctuationillustrato .
using System;
public class IsPunctuationSample {
public static void Main() {
char ch = '.';
Console.WriteLine(Char.IsPunctuation(ch)); // Output: "True"
Console.WriteLine(Char.IsPunctuation("no punctuation", 3)); // Output: "False"
}
}
open System
let ch = '.'
printfn $"{Char.IsPunctuation ch}" // Output: "True"
printfn $"""{Char.IsPunctuation("no punctuation", 3)}""" // Output: "False"
Module IsPunctuationSample
Sub Main()
Dim ch As Char
ch = "."c
Console.WriteLine(Char.IsPunctuation(ch)) ' Output: "True"
Console.WriteLine(Char.IsPunctuation("no punctuation", 3)) ' Output: "False"
End Sub
End Module
Commenti
I segni di punteggiatura validi sono membri delle categorie seguenti in UnicodeCategory: ConnectorPunctuation, DashPunctuation, OpenPunctuation, ClosePunctuationInitialQuotePunctuation, FinalQuotePunctuation, o OtherPunctuation. Includono caratteri con i punti di codice Unicode seguenti:
- Da U+0021 a U+0023
- U+060C e U+060D
- Da U+1800 a U+180A
- Da U+3014 a U+301F
- Da U+0025 a U+002A
- U+061B
- U+1944 e U+1945
- U+3030
- Da U+002C a U+002F
- U+061E e U+061F
- U+19DE e U+19DF
- U+303D
- U+003A e U+003B
- Da U+066A a U+066D
- U+1A1E e U+1A1F
- U+30A0
- U+003F e U+0040
- U+06D4
- Da U+1B5A a U+1B60
- U+30FB
- Da U+005B a U+005D
- Da U+0700 a U+070D
- Da U+2010 a U+2027
- Da U+A874 a U+A877
- U+005F
- Da U+07F7 a U+07F9
- Da U+2030 a U+2043
- U+FD3E e U+FD3F
- U+007B
- U+0964 e U+0965
- Da U+2045 a U+2051
- Da U+FE10 a U+FE19
- U+007D
- U+0970
- Da U+2053 a U+205E
- Da U+FE30 a U+FE52
- U+00A1
- U+0DF4
- U+207D e U+207E
- Da U+FE54 a U+FE61
- U+00AB
- Da U+0E4F a U+0E5B
- U+208D e U+208E
- U+FE63
- U+00AD
- Da U+0F04 a U+0F12
- U+2329 e U+232A
- U+FE68
- U+00B7
- Da U+0F3A a U+0F3D
- Da U+2768 a U+2775
- U+FE6A e U+FE6B
- U+00BB
- U+0F85
- Da U+27C5 a U+27C6
- Da U+FF01 a U+FF03
- U+00BF
- U+0FD0 e U+0FD1
- Da U+27E6 a U+27EB
- Da U+FF05 a U+FF0A
- U+037E
- Da U+104A a U+104F
- Da U+2983 a U+2998
- Da U+FF0C a U+FF0F
- U+0387
- U+10FB
- Da U+29D8 a U+29DB
- U+FF1A e U+FF1B
- Da U+055A a U+055F
- Da U+1361 a U+1368
- U+29FC e U+29FD
- U+FF1F e U+FF20
- U+0589 e U+058A
- U+166D e U+166E
- Da U+2CF9 a U+2CFC
- Da U+FF3B a U+FF3D
- U+05BE
- U+169B e U+169C
- U+2CFE e U+2CFF
- U+FF3F
- U+05C0
- Da U+16EB a U+16ED
- Da U+2E00 a U+2E17
- U+FF5B
- U+05C3
- U+1735 e U+1736
- U+2E1C e U+2E1D
- U+FF5D
- U+05C6
- Da U+17D4 a U+17D6
- Da U+3001 a U+3003
- Da U+FF5F a U+FF65
- U+05F3 e U+05F4
- Da U+17D8 a U+17DA
- Da U+3008 a U+3011
IsPunctuation(Char)
- Origine:
- Char.cs
- Origine:
- Char.cs
- Origine:
- Char.cs
- Origine:
- Char.cs
- Origine:
- Char.cs
Indica se il carattere Unicode specificato è categorizzato come segno di punteggiatura.
public:
static bool IsPunctuation(char c);
public static bool IsPunctuation(char c);
static member IsPunctuation : char -> bool
Public Shared Function IsPunctuation (c As Char) As Boolean
Parametri
- c
- Char
Carattere Unicode da valutare.
Valori restituiti
true se c è un segno di punteggiatura; in caso contrario, false.
Commenti
I segni di punteggiatura validi sono membri delle categorie seguenti in UnicodeCategory: ConnectorPunctuation, DashPunctuation, OpenPunctuation, ClosePunctuationInitialQuotePunctuation, FinalQuotePunctuation, o OtherPunctuation. Includono caratteri con i punti di codice Unicode seguenti:
- Da U+0021 a U+0023
- U+060C e U+060D
- Da U+1800 a U+180A
- Da U+3014 a U+301F
- Da U+0025 a U+002A
- U+061B
- U+1944 e U+1945
- U+3030
- Da U+002C a U+002F
- U+061E e U+061F
- U+19DE e U+19DF
- U+303D
- U+003A e U+003B
- Da U+066A a U+066D
- U+1A1E e U+1A1F
- U+30A0
- U+003F e U+0040
- U+06D4
- Da U+1B5A a U+1B60
- U+30FB
- Da U+005B a U+005D
- Da U+0700 a U+070D
- Da U+2010 a U+2027
- Da U+A874 a U+A877
- U+005F
- Da U+07F7 a U+07F9
- Da U+2030 a U+2043
- U+FD3E e U+FD3F
- U+007B
- U+0964 e U+0965
- Da U+2045 a U+2051
- Da U+FE10 a U+FE19
- U+007D
- U+0970
- Da U+2053 a U+205E
- Da U+FE30 a U+FE52
- U+00A1
- U+0DF4
- U+207D e U+207E
- Da U+FE54 a U+FE61
- U+00AB
- Da U+0E4F a U+0E5B
- U+208D e U+208E
- U+FE63
- U+00AD
- Da U+0F04 a U+0F12
- U+2329 e U+232A
- U+FE68
- U+00B7
- Da U+0F3A a U+0F3D
- Da U+2768 a U+2775
- U+FE6A e U+FE6B
- U+00BB
- U+0F85
- Da U+27C5 a U+27C6
- Da U+FF01 a U+FF03
- U+00BF
- U+0FD0 e U+0FD1
- Da U+27E6 a U+27EB
- Da U+FF05 a U+FF0A
- U+037E
- Da U+104A a U+104F
- Da U+2983 a U+2998
- Da U+FF0C a U+FF0F
- U+0387
- U+10FB
- Da U+29D8 a U+29DB
- U+FF1A e U+FF1B
- Da U+055A a U+055F
- Da U+1361 a U+1368
- U+29FC e U+29FD
- U+FF1F e U+FF20
- U+0589 e U+058A
- U+166D e U+166E
- Da U+2CF9 a U+2CFC
- Da U+FF3B a U+FF3D
- U+05BE
- U+169B e U+169C
- U+2CFE e U+2CFF
- U+FF3F
- U+05C0
- Da U+16EB a U+16ED
- Da U+2E00 a U+2E17
- U+FF5B
- U+05C3
- U+1735 e U+1736
- U+2E1C e U+2E1D
- U+FF5D
- U+05C6
- Da U+17D4 a U+17D6
- Da U+3001 a U+3003
- Da U+FF5F a U+FF65
- U+05F3 e U+05F4
- Da U+17D8 a U+17DA
- Da U+3008 a U+3011
Vedi anche
Si applica a
IsPunctuation(String, Int32)
- Origine:
- Char.cs
- Origine:
- Char.cs
- Origine:
- Char.cs
- Origine:
- Char.cs
- Origine:
- Char.cs
Indica se il carattere in corrispondenza della posizione specificata in una stringa specificata è categorizzato come segno di punteggiatura.
public:
static bool IsPunctuation(System::String ^ s, int index);
public static bool IsPunctuation(string s, int index);
static member IsPunctuation : string * int -> bool
Public Shared Function IsPunctuation (s As String, index As Integer) As Boolean
Parametri
- s
- String
Una stringa.
- index
- Int32
Posizione del carattere da valutare in s.
Valori restituiti
true se il carattere in corrispondenza della posizione index in s è un segno di punteggiatura; in caso contrario, false.
Eccezioni
s è null.
index è minore di zero o maggiore dell'ultima posizione in s.
Commenti
Le posizioni dei caratteri in una stringa vengono indicizzate a partire da zero.
I segni di punteggiatura validi sono membri delle categorie seguenti in UnicodeCategory: ConnectorPunctuation, DashPunctuation, OpenPunctuation, ClosePunctuationInitialQuotePunctuation, FinalQuotePunctuation, o OtherPunctuation. Includono caratteri con i punti di codice Unicode seguenti:
- Da U+0021 a U+0023
- U+060C e U+060D
- Da U+1800 a U+180A
- Da U+3014 a U+301F
- Da U+0025 a U+002A
- U+061B
- U+1944 e U+1945
- U+3030
- Da U+002C a U+002F
- U+061E e U+061F
- U+19DE e U+19DF
- U+303D
- U+003A e U+003B
- Da U+066A a U+066D
- U+1A1E e U+1A1F
- U+30A0
- U+003F e U+0040
- U+06D4
- Da U+1B5A a U+1B60
- U+30FB
- Da U+005B a U+005D
- Da U+0700 a U+070D
- Da U+2010 a U+2027
- Da U+A874 a U+A877
- U+005F
- Da U+07F7 a U+07F9
- Da U+2030 a U+2043
- U+FD3E e U+FD3F
- U+007B
- U+0964 e U+0965
- Da U+2045 a U+2051
- Da U+FE10 a U+FE19
- U+007D
- U+0970
- Da U+2053 a U+205E
- Da U+FE30 a U+FE52
- U+00A1
- U+0DF4
- U+207D e U+207E
- Da U+FE54 a U+FE61
- U+00AB
- Da U+0E4F a U+0E5B
- U+208D e U+208E
- U+FE63
- U+00AD
- Da U+0F04 a U+0F12
- U+2329 e U+232A
- U+FE68
- U+00B7
- Da U+0F3A a U+0F3D
- Da U+2768 a U+2775
- U+FE6A e U+FE6B
- U+00BB
- U+0F85
- Da U+27C5 a U+27C6
- Da U+FF01 a U+FF03
- U+00BF
- U+0FD0 e U+0FD1
- Da U+27E6 a U+27EB
- Da U+FF05 a U+FF0A
- U+037E
- Da U+104A a U+104F
- Da U+2983 a U+2998
- Da U+FF0C a U+FF0F
- U+0387
- U+10FB
- Da U+29D8 a U+29DB
- U+FF1A e U+FF1B
- Da U+055A a U+055F
- Da U+1361 a U+1368
- U+29FC e U+29FD
- U+FF1F e U+FF20
- U+0589 e U+058A
- U+166D e U+166E
- Da U+2CF9 a U+2CFC
- Da U+FF3B a U+FF3D
- U+05BE
- U+169B e U+169C
- U+2CFE e U+2CFF
- U+FF3F
- U+05C0
- Da U+16EB a U+16ED
- Da U+2E00 a U+2E17
- U+FF5B
- U+05C3
- U+1735 e U+1736
- U+2E1C e U+2E1D
- U+FF5D
- U+05C6
- Da U+17D4 a U+17D6
- Da U+3001 a U+3003
- Da U+FF5F a U+FF65
- U+05F3 e U+05F4
- Da U+17D8 a U+17DA
- Da U+3008 a U+3011