daily pastebin goal
27%
SHARE
TWEET

Identify

a guest May 17th, 2018 96 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. import java.io.*;
  2. import java.util.ArrayList;
  3. import java.util.Arrays;
  4.  
  5. public class CCOdeIdentify
  6. {
  7.     public static void main (String arg[])
  8.     {
  9.         try
  10.         {
  11.             String dest = "/home/ndub/Desktop/c.txt";
  12.  
  13.             FileReader fileReader = new FileReader(dest);
  14.             BufferedReader bufferedReader = new BufferedReader(fileReader);
  15.  
  16.             String line;
  17.             StringBuffer sb = new StringBuffer();
  18.  
  19.             while ((line = bufferedReader.readLine())!=null)
  20.             {
  21.                 sb.append(line);
  22.                 sb.append(" ");
  23.             }
  24.  
  25.             String lineout = sb.toString();
  26.  
  27.             String[] splet = lineout.split(" ");
  28.  
  29.             ArrayList<String> arr = new ArrayList<>(Arrays.asList(splet));
  30.  
  31.             ArrayList<String> keyWords = new ArrayList<>();
  32.  
  33.             if(arr.contains("#include")&& arr.contains("<stdio.h>"))
  34.             {
  35.                 //regex pattern (# <>) check and print
  36.             }
  37.  
  38.  
  39.         }
  40.  
  41.         catch (IOException e)
  42.         {
  43.  
  44.         }
  45.     }
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top