fork download
  1. using static System.Console;
  2. using static System.Math;
  3.  
  4. public class Program {
  5. public static void Main() {
  6. var texto = "teste 1";
  7. WriteLine(texto.Substring(0, Min(texto.Length, 48)));
  8. texto = "teste 1, teste 2, teste 3, teste 4, teste 5, teste 6, teste 7";
  9. WriteLine(texto.Substring(0, Min(texto.Length, 48)));
  10. }
  11. }
  12.  
  13. //https://pt.stackoverflow.com/q/43048/101
Success #stdin #stdout 0.02s 15796KB
stdin
Standard input is empty
stdout
teste 1
teste 1, teste 2, teste 3, teste 4, teste 5, tes