import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-candidate-info',
  templateUrl: 'candidate-info.component.html',
  styleUrls: ['candidate-info.component.css']
})
export class CandidateInfoComponent implements OnInit {

  @Input() fullName: string;
  @Input() jobId: string;
  @Input() experienceLevel: string;

  constructor() { }

  ngOnInit() {

  }
  Initials(cString) {
    if(cString) {
      return cString.replace(/\W*(\w)\w*/g, '$1').toUpperCase()
    }
  }

  getSubstring(text){
    if(text) {
      return text.substring(0, 3);
    }
    else{
      return null;
    }
  }
}
