     }
     
     //受け取ったpivotindexよりも大きいindexの要素は削除する関数
-    func AAA(var array: Array<Int>, pivotindex: String.CharacterView.Index, text: String) -> Array<Int>{
+    func RemoveElementThanPivotIndex(var array: Array<Int>, pivotindex: String.CharacterView.Index, text: String) -> Array<Int>{
         
         let index = text.startIndex
         var removeelement: [Int] = []

                index = index.successor()
            }
            
            if(removeflag){
                earlyshiftlocationarray = self.AAA(earlyshiftlocationarray, pivotindex: index, text: staffarraytmp)
                center1shiftlocationarray = self.AAA(center1shiftlocationarray, pivotindex: index, text: staffarraytmp)
                center2shiftlocationarray = self.AAA(center2shiftlocationarray, pivotindex: index, text: staffarraytmp)
                center3shiftlocationarray = self.AAA(center3shiftlocationarray, pivotindex: index, text: staffarraytmp)
                lateshiftlocationarray = self.AAA(lateshiftlocationarray, pivotindex: index, text: staffarraytmp)
                othershiftlocationarray = self.AAA(othershiftlocationarray, pivotindex: index, text: staffarraytmp)
                holidayshiftlocationarray = self.AAA(holidayshiftlocationarray, pivotindex: index, text: staffarraytmp)
            }
            
            
            
            
            //要素数を比較して正しくシフト体制を認識できているかチェックする

                    numeralcount = 0
                }
                
                //数値の連続が5回以上なら数列として判断する
                if(numeralcount >= 5){
                    index = index.advancedBy(-4)
                    removeflag = true
                    break
                }
