Java 78, 166 66 63 52 4343 21 bytes
int c(String s){return s->s.trim().charAt(1);}
Outputs 35
for right and 32
for left.
Based on @Clashsoft's Dyvil answer.
Explanation:
ints-> c(String s){ // Method with String parameter and integer return-type
return s.trim() // Remove leading and trailing whitspaceswhitespaces
.charAt(1); // and return the second character (as int value)
} // End of method
Test code:
class M{
static int c(String s){return s.trim().charAt(1);}
public static void main(String[] a){
System.out.println(c(" ## #\n ## #\n ###\n #\n #\n #"));
System.out.println(c(" ## # \n ## # \n ###\n ##\n #\n #\n #"));
System.out.println(c(" ## # \n ## # \n ###\n ##\n # \n # \n # "));
System.out.println(c(" ## # \n ## # \n ###\n #\n # \n # \n # "));
System.out.println(c(" # ## \n # ## \n ###\n #\n # \n # \n # "));
System.out.println(c(" # ## \n # ## \n ###\n #\n #\n #\n #"));
}
}
Output:
35
35
35
35
32
32