                 if(tmp[dbindex] == character){
                     result += String(tmp[dbindex])
                     dbindex = dbindex.successor()
-                    sp++
-                    character = text[text.startIndex.advancedBy(sp)]
+                    position_sp += 1
+                    character = text[text.startIndex.advancedBy(position_sp)]
                 }else{
                     result = ""
                     break

            break
        }
        
        for i in 0 ..< shiftnamearray.count{
            
            let tmp = shiftnamearray[i]

        let monthrange = CommonMethod().GetShiftCoursMonthRange(shiftyearandmonth.startcoursmonthyear, shiftstartmonth: shiftyearandmonth.startcoursmonth)

        //先に空要素を1クール分追加しておく
        for _ in 0 ..< monthrange.length{
            dayshiftarray.append("")
        }
        
