Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
Hi,
HOw to check is string \ ?
Posts: 71
Threads: 9
Joined: Feb 2016
Reputation:
0
You want to check if player type "\" ??
Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
No.
I have string like that
new string[ 50 ] = "\n";
and i need if in specific array slot
if( string[ 0 ] == "\\")
{
}
but that not work
Posts: 408
Threads: 40
Joined: Nov 2014
Reputation:
0
17.06.2017, 12:09
(
Last edited by Banditul18; 17/06/2017 at 12:48 PM.
)
Every "slot" of string can contain only a single character
if(string[0] == '/' && string[1] == '/')
//Do something
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
If you want to check a single character then you need to use single quotes, not double quotes.